{ "openapi" : "3.1.0", "info" : { "title" : "Chargebee API", "contact" : { "name" : "Chargebee Support", "url" : "https://www.chargebee.com", "email" : "support@chargebee.com" }, "version" : "2026-08-19.ac160eefbc69961d63f4f80ac6f28ba294244db8", "x-cb-api-version" : 2, "x-cb-product-catalog-version" : 2, "x-generated-on" : 1787124316768 }, "servers" : [ { "url" : "{protocol}://{site}.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443" ] } } }, { "url" : "{protocol}://{site}-test.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "https" ] }, "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 schedule", "description" : "**Caution**\n\n* This API will return an error when [multi-frequency billing](/docs/api/subscriptions#subscription-billing-frequencies) is enabled.\n\nDeletes an advance invoicing schedule. When *schedule_type = specific_dates*, you also have the option of deleting a part of the schedule.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for specific_dates_schedule\n", "properties" : { "id" : { "type" : "array", "description" : "When *schedule_type = specific_dates*\n, pass the id of the [specific_dates_schedule](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule)\nthat you want to remove. If not passed, the entire advance_invoice_schedule is removed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "specific_dates_schedule" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "advance_invoice_schedules" : { "type" : "array", "description" : "

Resource object representing advance_invoice_schedule

", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule", "description" : "Resource object representing advance_invoice_schedule" }, "example" : null } }, "required" : [ "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 a subscription", "description" : "

Updates a subscription by modifying its item prices, coupons, billing configuration, payment method, and other attributes. Any parameters not provided remain unchanged. The changes can be applied immediately, scheduled for a future date, or even backdated to a past date.

\n

Impacts

Subscription and Ramps: Impact on existing scheduled changes

    \n
  • If the subscription has existing scheduled changes, the behavior depends on whether Ramps are enabled:\n
      \n
    • Ramps disabled: Any existing scheduled change on the subscription is deleted.
    • \n
    • Ramps enabled with compatibility mode:\n
        \n
      • If only one ramp is present:\n
          \n
        • If the ramp was created using this API, the ramp is deleted.
        • \n
        • If the ramp was created using the Create a ramp API, and the date-time of the new change is before the date-time of the ramp, then the ramp is moved to draft status if the auto-draft conditions are met.
        • \n
        \n
      • \n
      • If multiple ramps are present: all ramps after the date-time of the new change are moved to draft status if the auto-draft conditions are met.
      • \n
      \n
    • \n
    \n
  • \n
  • For more details, see Ramps API compatibility mode.
  • \n

Subscription: Other impacts

Invoice

Credit Note

    \n
  • When the subscription change occurs in the middle of a billing term, and prorate is true, prorated credits may be created for the unused service periods of the subscription items.
  • \n

Payment Source

    \n
  • If payment_intent, payment_method, or card parameters are provided, a new payment source is created for the customer and associated with the subscription as the payment_source_id.
  • \n
\n

Use Cases

Add item prices to the subscription

To add new item prices to the subscription, pass them in the subscription_items parameter.

Example

Consider a subscription with the following item prices:

    \n
  • plan-a-monthly-usd
  • \n
  • addon-b-monthly-usd
  • \n

If you call this API with the following item price:

    \n
  • addon-c-monthly-usd
  • \n

The subscription will be updated to include the following item prices:

    \n
  • plan-a-monthly-usd
  • \n
  • addon-b-monthly-usd
  • \n
  • addon-c-monthly-usd
  • \n

Replace item prices in the subscription

To replace all existing item prices in the subscription with a new set of item prices, include the replace_items_list parameter and set it to true.

Example

Consider a subscription with the following item prices:

    \n
  • plan-a-monthly-usd
  • \n
  • addon-b-monthly-usd
  • \n

If you call this API with the following item prices and set replace_items_list to true:

    \n
  • plan-c-monthly-usd
  • \n
  • addon-d-monthly-usd
  • \n

The subscription will be updated to include only the new item prices:

    \n
  • plan-c-monthly-usd
  • \n
  • addon-d-monthly-usd
  • \n

Create payment source using payment_intent

Use the payment_intent parameter to create a payment source for the customer. Using payment intents is the recommended way to create a payment source in Chargebee for both Strong Customer Authentication (SCA) (i.e. 3D-Secure) and non-SCA flows.

    \n
  1. Create a payment_intent resource by calling the Create a payment intent API.
  2. \n
  3. Pass the payment_intent object to your frontend and use Chargebee.js to capture the payment source details from the customer. Use Payment Method Helpers to show payment method UIs and collect payment method details from the customer.
  4. \n
  5. Listen to the payment_intent_updated event. Once the payment_intent.status is authorized, pass the payment_intent.id using the payment_intent[id] parameter in this API call.
  6. \n

Create payment source using payment_method

If you prefer to use the payment gateway's SDKs to capture the payment method details, you can then use the payment_method parameter in this API to pass the payment method token and other details.

    \n
  1. Use the JavaScript library of your payment gateway to capture the payment method details. Examples include:\n\n
  2. \n
  3. Pass the payment method token using the payment_method[reference_id] or payment_method[tmp_token] parameter along with any additional parameters required by the payment gateway to create the payment source.
  4. \n

Create payment source using card

If you are PCI compliant, you can pass raw card details via this API. Use the card parameter to pass the card details.

", "operationId" : "update_subscription_for_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "A list of item IDs representing the [mandatorily attached addons](/docs/api/attached_items)\nassociated with the plan to which the subscription is being updated. These addons will be removed from the subscription during the subscription update process.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_items_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Determines whether the provided subscription_items replace existing subscription items or are added to the existing list.

\n

When subscription_items includes a plan

\n\n

When subscription_items contains only addons

\n", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Updates Net D for the subscription. Net D is the number of days from invoice.date until payment for the invoice is due.

\n

Constraints

", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The document date displayed on the invoice PDF. Use this parameter to backdate the invoice for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date.

\n

Prerequisites

\n

Default value

\n

Constraints

\n

Impacts

", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The new start date of a future subscription.

\n

Prerequisites

", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which the trial has ended or will end for the subscription. Set to 0 to have no trial period.

\n

Constraints

\n

Impact

", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling automatically. \n**Default value**\n\n* The value set for the [plan-item price](/docs/api/item_prices#billing_cycles) is used when not provided.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles to invoice in advance.\nIf a new term is started for the subscription due to this API call, then terms_to_charge\nis inclusive of this new term. See description for the force_term_reset\nparameter to learn more about when a subscription term is reset.

", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

If the subscription status\nis cancelled\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\nNote:\nIt is recommended not to pass this parameter along with changed_scheduled_at.\nreactivate_from\ncan 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", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* sepa_credit -\n\nSEPA Credit\n\\* cash -\n\nCash\n\\* no_preference -\n\nNo Preference\n\\* bank_transfer -\n\nBank Transfer\n\\* check -\n\nCheck\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* custom -\n\nCustom\n\\* boleto -\n\nBoleto\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n", "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" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "

The list of coupons to be applied to this subscription. You can provide coupon IDs or coupon codes.

\n

Note

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Determines whether the provided coupon_ids replace or add to the existing coupons on the subscription.

\n

Default value

", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "

When this subscription change is set to occur in the middle of the subscription term, prorate determines whether prorated credits and charges are created for the change.

\n\n

Default value

\nThe value configured in the site settings is used when not provided.

\n

Constraints

\nIf you set prorate to true for a change made mid-term in the billing cycle, credits are not created if all of the following were true for a previous change in the same billing term:

", "example" : null }, "end_of_term" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Deprecated

\n

This parameter has the same effect as setting the change_option parameter to end_of_term.

", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Forces the subscription term to start from the date of the subscription change when updating to a plan-item price with the same billing period as the current plan-item price.

\n

Default value

\n

Constraints

", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether to reactivate a cancelled subscription when making this API request.

\n

Default value

\n

Required if

", "example" : null }, "token_id" : { "type" : "string", "deprecated" : false, "description" : "

The Chargebee payment token generated by Chargebee JS.

\n

Note:\nThe payment token created via Chargebee JS uses the gateway selected through Smart Routing.\nExplicitly passing a gateway_id\nin this API call will not override the gateway associated with the token.

", "maxLength" : 40, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes) displayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of \\[key-value pairs\\](/docs/api/advanced-features#metadata) that provides extra information about the subscription. \\*\\*Constraints\\*\\* \\* There's a character limit of 65,535.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether charges raised immediately for the subscription are invoiced immediately or added to [unbilled charges](/docs/api/unbilled_charges). \n**Default value**\n\n* The value configured in the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration) is used when not provided. \n**Note:**\n\n* Any charges scheduled to be raised in the future are not affected by this parameter.\n", "example" : null }, "override_relationship" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, ignores the hierarchy relationship\nand uses customer as payment and invoice owner.

", "example" : null }, "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date-time at which the subscription change is to happen or has happened.

\n

Deprecated for scheduling changes

\n

Required if

\n

Constraints

\n

Backdated changes

\nchanges_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:

", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "

Specifies when the subscription change takes effect.

\n

Constraints

\nRegardless of the value of the change_option parameter, the following parameters always take effect immediately:

\n

See also

\n* end_of_term -

Deprecated\nThis option is deprecated; use the Create a ramp API instead.

\n

The change is carried out at the end of the current billing cycle of the subscription.

\n* specific_date -

Deprecated for scheduling changes\nThis option is deprecated for scheduling changes to occur at a future date-time, use the Create a ramp API instead.

\n

Executes the change on a specified date. The change occurs as of the date-time defined in changes_scheduled_at.

\n* immediately -

The subscription change takes effect immediately.

", "enum" : [ "immediately", "end_of_term", "specific_date" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The period of time by which the first billing term after trial is extended free of charge. The value is expressed in the time unit specified by free_period_unit. For example, 3 with free_period_unit = month adds 3 free months to the first paid term when the subscription becomes active.

", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The time unit for free_period.

\n

Constraints

\nMust be equal to or lower than the period_unit of the plan item price of the subscription.

\n* week -

Charge based on week(s)

\n* month -

Charge based on month(s)

\n* day -

Charge based on day(s)

\n* year -

Charge based on year(s)

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "create_pending_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether invoices for this subscription are generated with a pending status.

\n

Prerequisites

\n

Default behavior

\n

Use case

", "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "Overrides the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing) for auto-closing invoices for this subscription. \n**Prerequisites**\n\n* Auto-closing invoices must be enabled for the site. \n**Constraints**\n\n* This attribute has a higher precedence than the same attribute at the [customer level](customers/customer-object#auto_close_invoices).\n", "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "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)\nhas 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.\n\\* activate_subscription -\n\nThe subscription activates and charges are raised for non-metered items.\n\\* cancel_subscription -\n\nThe subscription cancels.\n\\* plan_default -\n\nThe action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n\\* site_default -\n\nThis is the default value. The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\\* customer -\n\nPass this value to indicate that the request is initiated by the customer\n\\* merchant -\n\nPass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "invoice_usages" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Determines whether to invoice the overages for metered items during the subscription change.

\n

Prerequisites

\n

Constraints

", "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card. Use this parameter to pass raw card details. Passing raw card data via API involves PCI liability at your end due to the sensitivity of the data.\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "

The gateway account in which these card details are stored.

\n

Required when

", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "The 16 digit credit card number. \nIf 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.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card scheme.\n\\* mastercard -\n\nA MasterCard scheme.\n\\* visa -\n\nA Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if billing_state_code\nis provided.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Use this parameter if you prefer to use the payment gateway's SDKs to capture the payment method details and pass the payment method token and other details here. See \\[use cases\\](/docs/api/subscriptions/update-subscription-for-items#use-cases) to learn more.\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* go_pay -\n\nPayments made via GoPay\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* qpay -\n\nPayments made via Qpay.\n\\* pix -\n\nPayments made via Pix\n\\* pay_by_bank -\n\nPay By Bank\n\\* sofort -\n\nPayments made via Sofort.\n\\* twint -\n\nPayments made via Twint\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* giropay -\n\nPayments made via giropay.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* paypay -\n\nPayments made via PayPay\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* upi -\n\nUPI Payments.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* tamara -\n\nPayments made via Tamara.\n\\* payme -\n\nPayments made via PayMe\n\\* pay_to -\n\nPayments made via PayTo\n\\* pay_co -\n\nPayments made via PayCo\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* klarna -\n\nPayments made via Klarna.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* swish -\n\nPayments made via Swish\n\\* venmo -\n\nPayments made via Venmo\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* dana -\n\nPayments made via Dana.\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* gcash -\n\nPayments made via GCash.\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* trustly -\n\nTrustly\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor 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:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 65000, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "

ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

If you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, then XI\n(the code for United Kingdom - Northern Ireland\n) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "

Pass these parameters to create a new payment_source using an authorized payment_intent. This is the recommended way to create a payment source in Chargebee for both Strong Customer Authentication (SCA) (i.e. 3D-Secure) and non-SCA flows. See use cases to learn more.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier for the payment_intent resource. If you provide this parameter, you do not need to pass other payment_intent parameters.

\n

Prerequisites

", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "

The payment method type.

\n

Default value

\n* card -

card

\n* twint -

Payments made via Twint

\n\n* dotpay -

dotpay

\n* faster_payments -

Faster Payments

\n\n* upi -

upi

\n* kbc_payment_button -

KBC Payment Button

\n* klarna -

Payments made via Klarna.

\n\n* payme -

Payments made via PayMe

\n\n* google_pay -

google_pay

\n* paypal_express_checkout -

paypal_express_checkout

\n* pix -

Pix

\n\n* klarna_pay_now -

Klarna Pay Now

\n\n* ideal -

ideal

\n* boleto -

boleto

\n* wechat_pay -

Payments made via WeChat Pay.

\n\n* after_pay -

Payments made via Afterpay

\n\n* grab_pay -

Payments made via GrabPay

\n\n* direct_debit -

direct_debit

\n* sepa_instant_transfer -

Sepa Instant Transfer

\n\n* bancontact -

bancontact

\n* touch_n_go -

Payments made via Touch 'n Go.

\n\n* qpay -

Payments made via Qpay.

\n\n* kakao_pay -

Payments made via Kakao Pay.

\n\n* dana -

Payments made via Dana.

\n\n* south_korean_cards -

Payments made via South Korean Cards

\n* swish -

Payments made via Swish

\n\n* go_pay -

Payments made via GoPay

\n\n* trustly -

Trustly

\n* naver_pay -

Payments made via Naver Pay.

\n\n* stablecoin -

Payments made via Stablecoin.

\n\n* venmo -

Venmo

\n\n* alipay -

Payments made via Alipay.

\n\n* tamara -

Payments made via Tamara.

\n\n* pay_to -

PayTo

\n\n* pay_co -

Payments made via PayCo

\n\n* cash_app_pay -

Payments made via Cash App Pay.

\n\n* alipay_hk -

Payments made via Alipay HK.

\n\n* netbanking_emandates -

netbanking_emandates

\n* paypay -

PayPay

\n* payconiq_by_bancontact -

Payments made via Payconiq by Bancontact.

\n\n* electronic_payment_standard -

Electronic Payment Standard

\n* pay_by_bank -

Pay By Bank

\n* apple_pay -

apple_pay

\n* online_banking_poland -

Online Banking Poland

\n\n* gcash -

Payments made via GCash.

\n\n* giropay -

giropay

\n* sofort -

sofort

\n* amazon_payments -

Amazon Payments

\n* revolut_pay -

Payments made via Revolut Pay.

\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Parameters for statement_descriptor\n", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment transaction descriptor text to help your customer easily recognize the transaction. When this value is passed this will override the [transaction descriptor](https://www.chargebee.com/docs/2.0/transaction_descriptors.html)\ntext configured in the Chargebee site for all the subscription renewal transactions.\n", "maxLength" : 65000, "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "

The VAT/tax registration number for the customer. For customers with billing_address

\n

country\nas\nXI\n(which is United Kingdom - Northern Ireland\n), the first two characters of the full VAT number\ncan be overridden by setting\nvat_number_prefix\n.

", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the customer is e-invoiced. When set to true\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (billing_address.country\n). When set to false\n, the customer is not e-invoiced even if e-invoicing is enabled for their country.

\n

Tip:

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", "example" : null }, "einvoicing_method" : { "type" : "string", "deprecated" : false, "description" : "Determines whether to send einvoice manually or automatic.\n\\* automatic -\n\nUse this value to send e-invoice every time an invoice or credit note is created.\n\\* manual -\n\nWhen manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API.\n\\* site_default -\n\nThe default value of the site which can be overridden at the customer level.\n", "enum" : [ "automatic", "manual", "site_default" ], "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "

The standard used for specifying the entity_identifier_scheme.\nCurrently only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "business_customer_without_vat_number" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is a valid business without an EU/UK VAT number.\n", "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true\nthen the Reverse Charge Mechanism\nis applicable. This field is applicable only when Australian GST is configured for your site.

", "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* 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.

\n\n* cancel -

Contract term completes and subscription is canceled.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - ", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "billing_override" : { "type" : "object", "deprecated" : false, "description" : "Specify limits on how credits and payments are applied to individual invoices for the subscription. Contact \\[Support\\](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api\\&utm_medium=content\\&utm_campaign=support) to enable this feature. Note: These limits do not apply to \\[consolidated invoices\\](https://www.chargebee.com/docs/2.0/consolidated-invoicing.html) .\n", "properties" : { "max_excess_payment_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of excess payments that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n", "minimum" : -1, "example" : null }, "max_refundable_credits_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of refundable credits that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n", "minimum" : -1, "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "

The list of item prices to add or update in the subscription.

\n

Note\nSee replace_items_list for more details.

", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price to add or update in the subscription. \n**Constraints**\n\n* The [item price currency](item_prices#currency_code) must match the [subscription's currency](subscriptions#currency_code).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "

The quantity of the item price purchased.

\n

Prerequisites

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity of the item purchased.

\n

Prerequisites

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price or per-unit price of the item. Overrides the price set for the item price.

\n

Prerequisites

\n

Default value

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the price or per-unit price of the item. Overrides the price set for the item price.

\n

Prerequisites

\n

Default value

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "For plan-item prices: The number of billing cycles the subscription runs before canceling automatically.\n\nFor addon-item prices: The number of subscription billing cycles for which the addon is included. Only applicable when [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) are enabled. \n**Default value**\n\n* For plan-item prices: The value set for the [item price](item_prices/item-price-object) is used.\n* For addon-item prices: The value set under [attached addons](attached_items/attached-item-object) is used. If that value is not provided, the value set for the [item price](item_prices/item-price-object) is used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* immediately -

The item is charged immediately on being added to the subscription.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "proration_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Specifies how to manage charges or credits for the addon item price during this subscription update.

\n

Prerequisites

\n

Default value

\n

Constraints

\n\n* none -

Don't apply any charges or credits for the addon.

\n* full_term -

Charge the full price of the addon or give the full credit. Don't apply any proration.

\n* partial_term -

Prorate the charges or credits for the rest of the current term.

", "enum" : [ "full_term", "partial_term", "none" ], "example" : null }, "example" : null }, "usage_accumulation_reset_frequency" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies the frequency at which the usage counter needs to be reset.\n\\* subscription_billing_frequency -\n\nAccumulates usage until the subscription's billing frequency ends.\n\\* never -\n\nAccumulates usage without ever resetting it.\n", "enum" : [ "never", "subscription_billing_frequency" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* 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\nand period_unit\n.

\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "operation_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be carried out for the discount.

\n\n* remove -

The discount (given by discounts[id]\n) is removed from the subscription. Subsequent invoices will no longer have the discount applied. Tip:\nIf you want to replace a discount, remove\nit and add\nanother in the same API call.

\n* add -

The discount is attached to the subscription.

", "enum" : [ "add", "remove" ], "example" : null }, "example" : null }, "id" : { "type" : "array", "description" : "

The id\nof the discount\nto be removed. This parameter is only relevant when discounts[operation_type]\nis remove\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "duration_type", "operation_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/subscriptions)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "billing_override" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null }, "credit_notes" : { "type" : "array", "description" : "

Resource object representing credit_note

", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nIf there are scheduled ramps for the subscription, this operation can move the ramps to the draft status when it conflicts with any upcoming ramps.

Removes coupons associated with the subscription. If the param coupon_ids\nis 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be removed from the subscription. You can provide only [coupon_id](/docs/api/coupons/coupon-object#id)\nand not [coupon_code](/docs/api/coupon_codes/coupon_code-object#code)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 and pass it as input parameter to this API.

This API is used to resume a paused subscription. On resumption the subscription will be activated and any applicable charges will be initiated.

You 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.

For in-term resumption, unless there are scheduled changes, unbilled charges will not be charged.

What is an "in-term resumption"?\nAn "in-term resumption" is when the pause and resumption happens within the billing term of the subscription.

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.

UNPAID INVOICES

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.

If you specify schedule_payment_collection, Chargebee will try to collect payments for overdue invoices, provided that auto_collection is enabled for the subscription. The available payment method is charged. Upon successful payment, the payment_succeeded event is triggered. If the payment collection fails, no further attempts will be made to collect payment on the invoices.

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.

Warning

This API will return an error when multi-frequency billing is enabled.

", "operationId" : "resume_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "resume_option" : { "type" : "string", "deprecated" : false, "description" : "List of options to resume the subscription.\n\\* immediately -\n\nResume immediately\n\\* specific_date -\n\nResume on a specific date\n", "enum" : [ "immediately", "specific_date" ], "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date on which the subscription will be resumed. Applicable when **resume_option**\nis set as 'specific_date'.\n", "example" : null }, "charges_handling" : { "type" : "string", "deprecated" : false, "description" : "Applicable when charges get added during this operation and **resume_option**\nis set as 'immediately'. Allows to raise invoice immediately or add them to unbilled charges.\n\\* add_to_unbilled_charges -\n\nAdd to unbilled charges\n\\* invoice_immediately -\n\nInvoice immediately\n", "enum" : [ "invoice_immediately", "add_to_unbilled_charges" ], "example" : null }, "unpaid_invoices_handling" : { "type" : "string", "deprecated" : false, "description" : "Applicable when the subscription has past due invoices and **resume_option**\nis 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.\n**Note:**\nThe payment collection attempt will be asynchronous.\n\\* no_action -\n\nRetain as unpaid\n\\* schedule_payment_collection -\n\nCollect payment\n", "enum" : [ "no_action", "schedule_payment_collection" ], "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\\* customer -\n\nPass this value to indicate that the request is initiated by the customer\n\\* merchant -\n\nPass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "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.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* card -\n\ncard\n\\* twint -\n\nPayments made via Twint\n\\* swish -\n\nPayments made via Swish\n\\* after_pay -\n\nPayments made via Afterpay\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* paypay -\n\nPayPay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* dotpay -\n\ndotpay\n\\* faster_payments -\n\nFaster Payments\n\\* upi -\n\nupi\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* klarna -\n\nPayments made via Klarna.\n\\* payme -\n\nPayments made via PayMe\n\\* direct_debit -\n\ndirect_debit\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* bancontact -\n\nbancontact\n\\* go_pay -\n\nPayments made via GoPay\n\\* pay_by_bank -\n\nPay By Bank\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* google_pay -\n\ngoogle_pay\n\\* apple_pay -\n\napple_pay\n\\* qpay -\n\nPayments made via Qpay.\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* trustly -\n\nTrustly\n\\* gcash -\n\nPayments made via GCash.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* giropay -\n\ngiropay\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* pix -\n\nPix\n\\* venmo -\n\nVenmo\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* alipay -\n\nPayments made via Alipay.\n\\* sofort -\n\nsofort\n\\* amazon_payments -\n\nAmazon Payments\n\\* tamara -\n\nPayments made via Tamara.\n\\* ideal -\n\nideal\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* pay_to -\n\nPayTo\n\\* dana -\n\nPayments made via Dana.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* boleto -\n\nboleto\n\\* pay_co -\n\nPayments made via PayCo\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "payment_intent" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 a subscription", "description" : "

Cancels the specified subscription.

\n

Prerequisites & Constraints

\n

Impacts

Subscription

    \n
  • The cancellation date-time depends on the provided parameters:\n
      \n
    • When the subscription does not have a contract term, use cancel_option.
    • \n
    • When the subscription has a contract term, use contract_term_cancel_option.
    • \n
    \n
  • \n
  • The subscription status changes to cancelled when canceled.
  • \n
  • If cancel_option is specified as end_of_term, or if contract_term_cancel_option is specified as end_of_subscription_billing_term, the subscription status changes to non_renewing and the subscription billing_cycles becomes 0.
  • \n

Contract Terms

    \n
  • The contract term and subscription are canceled together based on the provided contract_term_cancel_option.
  • \n

Ramps

If ramps are scheduled for the subscription, this operation deletes any ramps that are set to become effective on or after the subscription's cancellation date-time.

\n

Implementation Notes

Before calling this API, perform the following checks:

\n

Use Cases

Cancel a subscription with a contract term

If the subscription has a contract term, you can use the following parameters with this API:

    \n
  • contract_term_cancel_option
  • \n
  • cancel_at
  • \n
  • credit_option_for_current_term_charges
  • \n
  • unbilled_charges_option
  • \n
  • account_receivables_handling
  • \n
  • refundable_credits_handling
  • \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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "cancel_option" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Determines when to cancel the subscription.

\n
If the subscription has a contract term:
\n

This parameter is not applicable.

\n* end_of_billing_term -

This is used to cancel a subscription either at the end of the advance term, if it's billed for future renewals or at the end of its current billing cycle

\n* end_of_term -

This is used to cancel a subscription at the end of the current billing cycle

\n* immediately -

This is used to cancel the subscription with immediate effect

\n* specific_date -

This is used to cancel a subscription on a specified date. The change occurs as of the date/time defined in cancel_at

", "enum" : [ "immediately", "end_of_term", "specific_date", "end_of_billing_term" ], "example" : null }, "end_of_term" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

(Deprecated) Use cancel_option instead.\nApplicable only when the subscription does not have contract terms.\nSet 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.

", "example" : null }, "cancel_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies the date and time when the subscription should be canceled. Do not use this parameter when end_of_term is set to true.

\n
If the subscription has a contract term:
\n

Applicable only when contract_term_cancel_option is specific_date. Specifies the date and time to cancel the subscription and contract term.

\n
Backdating
\n

You can set a past date to backdate the cancellation. Backdating is allowed only if the following conditions are met:

\n", "example" : null }, "credit_option_for_current_term_charges" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies how to handle credits for current term charges when canceling immediately (i.e., cancel_option is immediately). If not specified, the site-level setting is used.

\n
If the subscription has a contract term:
\n

Specifies how to handle credits for current term charges when contract_term_cancel_option is terminate_immediately. If not specified, the site-level setting is used.

\n* none -

No credits notes are created.

\n* full -

Credits are issues for the full value of the current term charges.

\n* prorate -

Prorated credits are issued.

", "enum" : [ "none", "prorate", "full", "consumption_based" ], "example" : null }, "unbilled_charges_option" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies how to handle unbilled charges when canceling immediately (i.e., cancel_option is immediately). If not specified, the site-level setting is used.

\n
If the subscription has a contract term:
\n

Specifies how to handle unbilled charges when contract_term_cancel_option is terminate_immediately. If not specified, the site-level setting is used.

\n* invoice -

An invoice is generated immediately with the unbilled charges.

\n* delete -

The unbilled charges are deleted.

", "enum" : [ "invoice", "delete" ], "example" : null }, "account_receivables_handling" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies how to handle past due invoices when canceling immediately (i.e., cancel_option is immediately). If not specified, the site-level setting is used.

\n
If the subscription has a contract term:
\n

Specifies how to handle past due invoices when contract_term_cancel_option is terminate_immediately. If not specified, the site-level setting is used.

\n* no_action -

No action is taken.

\n* write_off -

Applies excess payments and refundable credits to past due invoices. Any remaining balance is written off.\nNote: The credit note for the write-off is not included in the API response.

\n* schedule_payment_collection -

Applies excess payments and refundable credits to past due invoices. If any amount remains and auto_collection\nis on\n, the remaining amount is automatically charged to the available payment method.

", "enum" : [ "no_action", "schedule_payment_collection", "write_off" ], "example" : null }, "refundable_credits_handling" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies how to handle refundable credits when canceling immediately (i.e., cancel_option is immediately). If not specified, the site-level setting is used.

\n
If the subscription has a contract term:
\n

Specifies how to handle refundable credits when contract_term_cancel_option is terminate_immediately. If not specified, the site-level setting is used.

\n* schedule_refund -

Refunds remaining credits after applying them to any past due invoices.

\n* no_action -

No action is taken.

", "enum" : [ "no_action", "schedule_refund" ], "example" : null }, "contract_term_cancel_option" : { "type" : "string", "deprecated" : false, "description" : "

Required when the subscription has a contract term. Determines when to cancel the subscription along with the contract term.

\n* terminate_immediately -

Cancels the subscription and contract term immediately. Sets the contract term's status to terminated and collects any termination fee, if applicable.\nTo specify the termination fee, include a single object in the subscription_items array. If not specified, the default termination fee is applied (if configured).

\n* end_of_contract_term -

Prevents the contract term from renewing and schedules the subscription for cancellation at the end of the contract term.

\n* specific_date -

Cancels the subscription and contract term on the date specified by cancel_at. Sets action_at_term_end to cancel.\nNote: Contact Chargebee Support to enable this option for your Chargebee site.

\n* end_of_subscription_billing_term -

Cancels the subscription and contract term at the end of the current billing cycle. Sets action_at_term_end to cancel.\nNote: Contact Chargebee Support to enable this option for your Chargebee site.

", "enum" : [ "terminate_immediately", "end_of_contract_term", "specific_date", "end_of_subscription_billing_term" ], "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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\nis true\n, 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\nand line_item_taxes\nare computed based on the tax\nconfiguration as of invoice_date.\nWhen passing this parameter, the following prerequisites must be met:

\n", "example" : null }, "include_cancellation_day_in_billing" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the cancellation day is included in the billing period when prorated credits are issued for the current term charges.\nSet to true to bill the customer for the cancellation day (the term ends on the cancellation date), or false to exclude it (the term ends the day before). If not specified, the site-level setting is used.\nThis parameter is applicable only for sites using Day-Based Billing, when:

\n\n

Note: Passing this parameter in any other scenario results in a validation error.

", "example" : null }, "cancel_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "decommissioned" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Indicates whether the subscription should be decommissioned when it is canceled. If set to true all subscription operations will be disabled except deletion.

\n

Note: Decommission operation is irreversible. Once set to true it cannot be updated to false and thus subscription will remain decommissioned permanently.

", "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "

The unique id\nof the charge item_price that represents the termination fee.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity associated with the termination fee. Applicable only when the item_price for the termination charge is quantity-based.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The termination fee. In case it is quantity-based, this is the fee per unit.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis 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-object#price)\nis 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/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the termination fee-expressed in days-starting from the current date.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "subscription_items" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null }, "credit_notes" : { "type" : "array", "description" : "

Resource object representing credit_note

", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Use this API to regenerate the current-term invoice for a subscription. The new invoice will contain non-metered charges from the current term and metered charges from the previous term.\nIf a customer was billed incorrectly, because of a wrong plan, price, or tax configuration, you can first void or delete the erroneous invoice, update the subscription or usage records, and then run this operation to issue the corrected invoice.

\n

Prerequisites & Constraints

Before regenerating an invoice, ensure the following conditions are met:

\n

Impacts

Current-Term Invoice

Chargebee does not modify the voided or deleted invoice for the current term. Instead, it creates a new invoice.

The new invoice includes:

    \n
  • Subscription-item charges for the current term.
  • \n
  • Usage charges from the previous term.
  • \n

The new invoice does not include:

    \n
  • One-time addon charges, including mandatory addons.
  • \n
  • Ad hoc or other one-time charges from the voided or deleted invoice.
  • \n
  • Unbilled charges.
  • \n
  • Usage charges for the current term.
  • \n

If every charge for the current-term has a value of zero, and your site is configured to hide zero-value line items, the invoice is not generated.

If you delete the original invoice, the associated usage data is also deleted. To ensure accurate billing for metered items, add or bulk import usage records before regenerating the invoice.

Payment Collection

If auto-collection is on, Chargebee attempts to collect payment for the regenerated invoice. If the payment collection fails, the invoice regeneration also fails.

Note: Chargebee applies any customer balances, such as unapplied payment from the voided invoice, before attempting to collect the remaining amount.

Order

Any orders associated with the invoice are regenerated automatically when the invoice is regenerated.

\n

Implementation Notes

Before calling this API, perform the following checks:

", "operationId" : "regenerate_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the period being invoiced. The default value is [current_term_start](/docs/api/subscriptions/subscription-object#current_term_start)\n.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the period being invoiced. The default value is [current_term_end](/docs/api/subscriptions/subscription-object#current_term_end)\n.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "

Whether the charges should be prorated according to the term specified by date_from\nand date_to.\nShould not be passed without date_from\nand date_to\n.

", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "

Only applicable when Consolidated Invoicing\nis enabled for the customer. Set to false\nto leave the current term charge for the subscription as unbilled.\nOnce you have done this for all suitable subscriptions of the customer, call Create an invoice for unbilled charges\nto invoice them.

", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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**\nthe conditions specified in the filter parameters below.\n", "operationId" : "list_subscriptions", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "

Indicates whether to include deleted objects in the list. The deleted objects have the attribute deleted\nas true\n.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nA unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is_not\\] = \"8gsnbYfsMLds\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer with whom this subscription is associated.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"8gsnbYfsMLds\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "item_id", "in" : "query", "description" : "optional, string filter\n\nThe plan item code.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*item_id\\[is_not\\] = \"silver\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "silver", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "item_price_id", "in" : "query", "description" : "optional, string filter\n\nThe plan item price code.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*item_price_id\\[is\\] = \"silver-USD-monthly\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "silver-USD-monthly", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent state of the subscription. Possible values are : future, in_trial, active, non_renewing, paused, cancelled.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is_not\\] = \"active\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "in" : { "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null } } } }, { "name" : "cancel_reason", "in" : "query", "description" : "optional, enumerated string filter\n\nThe 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.\n\n**Supported operators :**\nis, is_not, in, not_in, is_present\n\n**Example →**\n*cancel_reason\\[is\\] = \"not_paid\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "not_paid", "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "in" : { "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "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))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "cancel_reason_code", "in" : "query", "description" : "optional, string filter\n\nReason 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** .\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*cancel_reason_code\\[is\\] = \"Not Paid\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Not Paid", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "remaining_billing_cycles", "in" : "query", "description" : "optional, integer filter\n\n* 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.\n* When the subscription is on a [contract term](/docs/api/contract_terms): 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\n\n**Example →**\n*remaining_billing_cycles\\[is_not\\] = \"3\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe time at which the subscription was created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[before\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "activated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Time at which the subscription status\nlast changed to\nactive.\nFor example, this value is updated when an in_trial\nor\ncancelled\nsubscription activates.\nSupported operators :\nafter, before, on, between, is_present

\n

Example →\nactivated_at[after] = "1435054328"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "next_billing_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

The date/time at which the next billing for the subscription happens. This is usually right after current_term_end\nunless multiple subscription terms were invoiced in advance using the terms_to_charge\nparameter.\nSupported operators :\nafter, before, on, between

\n

Example →\nnext_billing_at[after] = "1435054328"

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

optional, boolean filter

\n

If true\n, there are subscription changes scheduled on next renewal. Possible values are : true, false

\n

Supported operators :\nis

\n

Example →\nhas_scheduled_changes[is] = "true"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.\nSupported operators :\nafter, before, on, between

\n

Example →\nupdated_at[after] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "offline_payment_method", "in" : "query", "description" : "optional, enumerated string filter\n\nThe preferred offline payment method for the subscription. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*offline_payment_method\\[is_not\\] = \"cash\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "cash", "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\n", "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" ], "example" : null }, "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\n", "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" ], "example" : null }, "in" : { "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\n", "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" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "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" ], "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))*\\]$", "example" : null } } } }, { "name" : "auto_close_invoices", "in" : "query", "description" : "

optional, boolean filter

\n

Set to false\nto override for this subscription, the site-level setting\nfor 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.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\nauto_close_invoices[is] = "true"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "override_relationship", "in" : "query", "description" : "

optional, boolean filter

\n

If true\n, ignores the hierarchy relationship\nand uses customer as payment and invoice owner. Possible values are : true, false

\n

Supported operators :\nis

\n

Example →\noverride_relationship[is] = "false"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "false", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } }, { "name" : "business_entity_id", "in" : "query", "description" : "optional, string filter\n\nThe unique ID of the\n[business entity](/docs/api/advanced-features)\nof this subscription. This is always the same as the\n[business entity](/docs/api/subscriptions/subscription-object#customer_id)\nof the customer.\n\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*business_entity_id\\[is_not\\] = \"business_entity_id\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "business_entity_id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is_not\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "decommissioned", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card" } }, "required" : [ "customer", "subscription" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 to another asynchronously. All related resources such as unbilled_charge, invoice, credit_note, and transaction are also moved to the new customer.

After moving, Chargebee adds a comment to the original customer resource to document the move, including the to_customer_id and the ids of all the resources transferred to the destination customer.

Warning

Prerequisites

Asynchronous operation

If 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.

To know whether the operation was successful, we recommend that you watch for the subscription_changed event and see if subscription.customer_id has changed.

Limitations

Note:\nResources linked to the original customer such as unbilled_charge\n, invoice\n, credit_note\n, and transaction\nbut not\nlinked to the subscription being moved, are not\nmoved to the destination customer by this operation.

", "operationId" : "move_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "to_customer_id" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the unique ID of the customer resource to which the subscription will be moved.

\n

Note:\nIf there are multiple business entities\n, the customer.business_entity_id\nof the destination customer must match the subscription.business_entity_id.

", "maxLength" : 50, "example" : null }, "copy_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

When true:\nIf the subscription has an associated payment_source:

\n
    \n
  1. A new duplicate copy of the payment_source resource is created.
  2. \n
  3. This new copy of the payment source is linked to the subscription and the destination customer.
  4. \n
\n

Note:\nDeleting any copy of the payment_source\nalso deletes the other copies and the details stored at the payment gateway.

\n

When false:\nNo new payment source is created for the subscription. Moreover, if a payment_source is already linked to the subscription, it gets removed, meaning the subscription.payment_source_id is cleared.

\n

Warning:\nWhen copy_payment_source\nis false\nand if subscription.auto_collection\nis enabled, auto-collection will fail, in turn preventing subscription renewal. To prevent auto-collection failure, link a payment source\nto the subscription after this operation.

", "example" : null } }, "required" : [ "to_customer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" } }, "required" : [ "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 a subscription", "description" : "

Imports a subscription for an existing customer.

Use this operation when migrating subscriptions from another billing system.

\n

Prerequisites & Constraints

If you are calling this operation on your live site, ensure you have requested Support to enable it; otherwise the API may return an "API not enabled" error.

\n

Impacts

Subscription

A subscription is created for the customer with the details provided in the request.

Invoice and payment

When create_current_term_invoice is true, an invoice is created for the current term.

", "operationId" : "import_subscription_for_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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|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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "exhausted_coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "

Specifies the IDs of coupons\nto be marked as exhausted. This parameter accepts a list of IDs, which must correspond to coupons with a duration_type\nof one_time.\nEnsure that the IDs included in this parameter do not match any IDs provided in the coupon_ids\nparameter.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\nSet it to 0\nto have no trial period.

", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles)\nis used.\n", "minimum" : 0, "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Defines Net D\nfor the subscription. Net D is the number of days within which any invoice raised for the subscription must be paid.

\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately.\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n", "enum" : [ "on", "off" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Id of the payment source to be attached to this subscription.\n", "maxLength" : 40, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current state of the subscription.\n\\* future -\n\nThe subscription is scheduled to start at a future date.\n\\* active -\n\nThe subscription is active and will be charged for automatically based on the items in it.\n\\* cancelled -\n\nThe subscription has been canceled and is no longer in service.\n\\* transferred -\n\nThe subscription has been transferred to another business entity within the organization.\n\\* in_trial -\n\nThe subscription is in trial.\n\\* non_renewing -\n\nThe subscription will be canceled at the end of the current term.\n\\* paused -\n\nThe subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html).\nThe subscription will not renew while in this state.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "current_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\n", "example" : null }, "current_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Start of the current billing period of the subscription. This is required when the subscription status\nis paused.\nWhen the status\nis active\nor non_renewing\n, it defaults to the current time.

", "example" : null }, "trial_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Start of the trial period for the subscription. When not passed, it is assumed to be current time. When passed for a future\nsubscription, it implies that the subscription goes into in_trial\nwhen it starts.

", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time at which subscription was cancelled or is set to be cancelled.\n", "example" : null }, "started_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Time at which the subscription was started. Is null\nfor future\nsubscriptions as it is yet to be started.

", "example" : null }, "activated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.

", "example" : null }, "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

When a pause has been scheduled, it is the date/time of scheduled pause. When the subscription is in the paused\nstate, it is the date/time when the subscription was paused.

", "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\n", "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "create_current_term_invoice" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Set as true\nif you want an invoice to be created for the subscription.

\n", "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A set of key-value pairs stored as additional information for the subscription. \\[Learn more\\](/docs/api/subscriptions) .\n", "example" : null }, "cancel_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "create_pending_invoices" : { "type" : "boolean", "deprecated" : false, "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.\nYou can also set this to true explicitly using the create/update subscription operations. This is useful in the following scenarios:

\n", "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "

Set to false\nto override for this subscription, the site-level setting\nfor 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\n.

", "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id that uniquely identifies the contract term in the site.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the contract term was created.\n", "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "total_amount_raised" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The amount raised for the contract term till the time of importing the subscription. This amount is added to the total_contract_value

", "minimum" : 0, "example" : null }, "total_amount_raised_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "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

", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* 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.

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The payment transaction amount.\n", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction. This parameter should be passed only if the invoice is created for the current term.\n\\* cash -\n\nCash\n\\* custom -\n\nCustom\n\\* check -\n\nCheck\n\\* bank_transfer -\n\nBank Transfer\n\\* other -\n\nPayment methods other than the named types above.\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "

The reference number for this transaction. For example, check number when payment_method is check.

", "maxLength" : 100, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date of occurrence of the transaction.\n", "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the [item price](/docs/api/item_prices) in Chargebee. At least one entry is required to import the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit price of the item. When not provided, [the value set](/docs/api/item_prices/item-price-object) for the item price is used.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis 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-object#price)\nis 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/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "The [id of the item price](/docs/api/subscriptions/subscription-object#subscription_items_item_price_id) in the subscription to which the discount is to be applied.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null }, "charged_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charged_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "

Identifier of the charge item price that was already charged for this subscription.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "last_charged_at" : { "type" : "array", "description" : "Timestamp when this charge item price was last charged for this subscription in the source system.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/subscriptions)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "status" ], "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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**\n\n* This API will return an error when [multi-frequency billing](/docs/api/subscriptions#subscription-billing-frequencies) is enabled.\n\nRetrieves the *advance_invoice_schedule* for a subscription. Note that this endpoint is only applicable for *schedule_type = specific_dates* or fixed_intervals.\n", "operationId" : "retrieve_advance_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "advance_invoice_schedules" : { "type" : "array", "description" : "

Resource object representing advance_invoice_schedule

", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule", "description" : "Resource object representing advance_invoice_schedule" }, "example" : null } }, "required" : [ "advance_invoice_schedules" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Removes a scheduled cancellation from a subscription so that it continues billing for the specified number of billing cycles.\nUse this operation when a customer changes their mind about canceling their subscription.

\n

Prerequisites & Constraints

\n

Impacts

Subscription

    \n
  • The scheduled cancellation is removed.
  • \n
  • If the subscription status is in_trial, it does not change.
  • \n
  • If the subscription status is not in_trial, it becomes active.
  • \n
  • subscription.remaining_billing_cycles is set to the value of billing_cycles.
  • \n
  • If contract_term is provided, then a new contract_term is created on the subscription.
  • \n
\n

Implementation Notes

Before calling this API, perform the following checks:

\n

Related APIs

Cancel a subscription

Pause a subscription

", "operationId" : "remove_scheduled_cancellation", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of billing cycles the subscription should remain active for after the current billing cycle. The remaining_billing_cycles attribute of the subscription is updated to this value.

\n

Constraints

\n

Default Value

", "minimum" : 0, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* cancel -

Contract term completes and subscription is canceled.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - ", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 a subscription with scheduled changes", "description" : "

Note\nIf the ramps feature is enabled and there is more than one ramp on a subscription, this API will return the subscription with the upcoming ramp applied.

Retrieves a subscription with the scheduled changes applied.\nNote: Only the following attributes are changed

", "operationId" : "retrieve_with_scheduled_changes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Reactivates a canceled subscription.

Use this operation to restore a canceled subscription to an active or in-trial state.

Extend non-renewing subscriptions

To extend the billing cycles of a non_renewing subscription, use the Remove scheduled cancellation API.

In-term reactivation

The subscription's current billing term is demarcated by the current_term_start and current_term_end attributes. These attributes are retained even if the subscription is canceled. An "in-term reactivation" happens when the subscription is reactivated on or before current_term_end.

\n

Prerequisites & Constraints

\n

Impacts

Subscription

Invoice

If an invoice gets generated during this operation, customer balances such as promotional credits, excess payments, and refundable credits are automatically applied subject to limits set at the site level which can be overridden for subscriptions via subscription.billing_override.

\n

Use Cases

Create payment source using payment_intent

Use the payment_intent parameter to create a payment source for the customer. If reactivation generates an invoice and auto_collection is on, Chargebee immediately attempts payment collection using the new payment source.

Note

    \n
  1. Create a payment_intent resource by calling the Create a payment intent API.
  2. \n
  3. Pass the payment_intent object to your frontend and use Chargebee.js to capture the payment source details from the customer. You can use Payment Components to capture the payment source details.
  4. \n
  5. Listen to the payment_intent_updated event. Once the payment_intent.status is authorized, pass the payment_intent.id using the payment_intent[id] parameter in this API call.
  6. \n
\n

Related APIs

Remove scheduled cancellation

", "operationId" : "reactivate_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Providing this parameter indicates that the subscription reactivates with an in_trial status and the trial period ends at the date provided.

\n

Constraints

", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of billing cycles (including the current cycle) this subscription should remain active for. After the billing cycles are exhausted, the subscription is canceled automatically.

\n

Default value

\n

Impact

", "minimum" : 0, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date-time at which the subscription was reactivated. When not provided, the subscription is reactivated immediately on calling this API.

\n

Prerequisites

Constraints

", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "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.\nThe default value is as per the site settings\n.

\n

Note:\ninvoice_immediately\nonly 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

.

", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Applicable when calendar billing is enabled and a new *active*\nterm gets started during this operation. Unless specified the configured *default*\nvalue will be used.\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles to invoice in advance.\nIf a new term is started for the subscription due to this API call, then terms_to_charge\nis inclusive of this new term. See description for the force_term_reset\nparameter to learn more about when a subscription term is reset.

", "minimum" : 1, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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. 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.

\n

Default value

\n

Constraints

", "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of billing cycles the new contract term should run for, on contract renewal. This value is used when action_at_term_end is renew.

\n

Constraints

\n

Default value

", "maximum" : 100, "minimum" : 1, "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The initiator of this payment request. Sending this information can improve the success rate of the payment at the gateway.\n\\* customer -\n\nThe payment was initiated by your customer.\n\\* merchant -\n\nThe payment was initiated by you (the merchant).\n", "enum" : [ "customer", "merchant" ], "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for creating a contract term for the subscription. \\*\\*Prerequisites\\*\\* \\* \\[Contract Terms\\](https://www.chargebee.com/docs/contract-terms.html) feature must be enabled for the site.\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n

Constraints

\n* evergreen -

The contract term completes and the subscription continues to renew without a new contract term.

\n* renew -

The contract term completes and a new contract term is started for the number of billing cycles specified in contract_term_billing_cycle_on_renewal. The action_at_term_end for the new contract term is set to renew.

\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end during which the customer is barred from canceling the contract term. The customer can 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.

\n

Required if

\n

Constraints

", "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Parameters for statement_descriptor\n", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment transaction descriptor text to help your customer easily recognize the transaction. When this value is passed this will override the [transaction descriptor](https://www.chargebee.com/docs/2.0/transaction_descriptors.html)\ntext configured in the Chargebee site for all the subscription renewal transactions.\n", "maxLength" : 65000, "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier for the payment_intent resource. If you provide this parameter, you do not need to pass other payment_intent parameters.

\n

Prerequisites

", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "

The payment method type.

\n

Default value

\n* alipay_hk -

Payments made via Alipay HK.

\n\n* card -

card

\n* twint -

Payments made via Twint

\n\n* swish -

Payments made via Swish

\n\n* after_pay -

Payments made via Afterpay

\n\n* netbanking_emandates -

netbanking_emandates

\n* grab_pay -

Payments made via GrabPay

\n\n* paypay -

PayPay

\n* payconiq_by_bancontact -

Payments made via Payconiq by Bancontact.

\n\n* dotpay -

dotpay

\n* faster_payments -

Faster Payments

\n\n* upi -

upi

\n* kbc_payment_button -

KBC Payment Button

\n* electronic_payment_standard -

Electronic Payment Standard

\n* klarna -

Payments made via Klarna.

\n\n* payme -

Payments made via PayMe

\n\n* direct_debit -

direct_debit

\n* sepa_instant_transfer -

Sepa Instant Transfer

\n\n* bancontact -

bancontact

\n* go_pay -

Payments made via GoPay

\n\n* pay_by_bank -

Pay By Bank

\n* touch_n_go -

Payments made via Touch 'n Go.

\n\n* google_pay -

google_pay

\n* apple_pay -

apple_pay

\n* qpay -

Payments made via Qpay.

\n\n* online_banking_poland -

Online Banking Poland

\n\n* trustly -

Trustly

\n* gcash -

Payments made via GCash.

\n\n* naver_pay -

Payments made via Naver Pay.

\n\n* stablecoin -

Payments made via Stablecoin.

\n\n* giropay -

giropay

\n* paypal_express_checkout -

paypal_express_checkout

\n* pix -

Pix

\n\n* venmo -

Venmo

\n\n* klarna_pay_now -

Klarna Pay Now

\n\n* alipay -

Payments made via Alipay.

\n\n* sofort -

sofort

\n* amazon_payments -

Amazon Payments

\n* tamara -

Payments made via Tamara.

\n\n* ideal -

ideal

\n* kakao_pay -

Payments made via Kakao Pay.

\n\n* pay_to -

PayTo

\n\n* dana -

Payments made via Dana.

\n\n* south_korean_cards -

Payments made via South Korean Cards

\n* boleto -

boleto

\n* pay_co -

Payments made via PayCo

\n\n* revolut_pay -

Payments made via Revolut Pay.

\n\n* wechat_pay -

Payments made via WeChat Pay.

\n\n* cash_app_pay -

Payments made via Cash App Pay.

\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true }, "payment_intent" : { "style" : "deepObject", "explode" : true }, "statement_descriptor" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 a single advance invoice or an advance invoicing schedule for a subscription.

Use this operation to bill future renewals in advance, enabling customers to prepay for upcoming billing cycles.

\n

Prerequisites & Constraints

\n

Impacts

Subscription
    \n
  • The subscription next_billing_at is updated to reflect the end of the last term being invoiced. If all remaining billing cycles are invoiced, next_billing_at is set to null.
  • \n
  • The subscription's remaining_billing_cycles is reduced by the number of terms charged.
  • \n
Invoice
    \n
  • When schedule_type is immediate and invoice_immediately = true:\n
      \n
    • a single advance invoice is created covering the specified number of future billing cycles.
    • \n
    • the invoice includes line items for all non-metered items, applicable coupons, taxes, and credits.
    • \n
    • any changes scheduled in the current term or at the end of the current term for the subscription are automatically taken into account while generating the advance invoice.
    • \n
    • if auto_collection is on for the subscription, the payment for the invoice is collected immediately using the payment source associated with the subscription.
    • \n
    \n
  • \n
Unbilled Charges
    \n
  • When schedule_type is immediate and invoice_immediately is false: The charges are added to unbilled_charges for the subscription and invoiced on the next renewal.
  • \n
Advance Invoice Schedule
    \n
  • When schedule_type is specific_dates or fixed_intervals:\n
      \n
    • an advance invoice schedule is created. The schedule defines when advance invoices will be generated in the future.
    • \n
    • any changes scheduled for the subscription are automatically taken into account while generating the advance invoice.
    • \n
    \n
  • \n
", "operationId" : "charge_future_renewals", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "terms_to_charge" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "

The number of billing cycles to charge, depending on the schedule_type:

\n\n

Constraints

\n

Default value

", "minimum" : 1, "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "

Whether the charge should be invoiced immediately or added to unbilled_charges.

\n

Prerequisite

\n

Constraints

\n

Default value

", "example" : null }, "schedule_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of advance invoice or advance invoicing schedule.

\n

Default value

\n* immediate -

Bill immediately for the number of billing cycles specified by terms_to_charge.

\n

Prerequisite

\n* specific_dates -

Invoice on specific dates.

\n

Prerequisite

\n

Constraints

\n* fixed_intervals -

Invoice at fixed intervals of time.

\n

Prerequisite

\n

Constraints

", "enum" : [ "immediate", "specific_dates", "fixed_intervals" ], "example" : null }, "fixed_interval_schedule" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for fixed_interval_schedule.

\n

Required if

\n

Constraint

", "properties" : { "number_of_occurrences" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of advance invoices to generate.

\n

Required if

\n

Impact

", "minimum" : 1, "example" : null }, "days_before_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before each interval that advance invoices are generated.

\n

Constraints

", "minimum" : 1, "example" : null }, "end_schedule_on" : { "type" : "string", "deprecated" : false, "description" : "

Specifies when the advance invoicing schedule ends.

\n* after_number_of_intervals -

Advance invoices are generated a specified number of times.

\n

Constraint

\n* subscription_end -

Advance invoices are generated for as long as the subscription is active.

\n* specific_date -

The advance invoicing schedule ends on a specific date.

\n

Constraint

", "enum" : [ "after_number_of_intervals", "specific_date", "subscription_end" ], "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date when the advance invoicing schedule ends. Advance invoices are not generated beyond this date.

\n

Constraints

", "example" : null } }, "example" : null }, "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for specific_dates_schedule.

\n

Required if

\n

Constraints

", "properties" : { "terms_to_charge" : { "type" : "array", "description" : "

The number of billing cycles to charge for on the specified date.

\n

Constraints

\n

Default value

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date" : { "type" : "array", "description" : "

The date on which the advance invoice should be generated. This is the scheduled date for generating the invoice for the specified number of billing cycles.

\n

Constraints

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "fixed_interval_schedule" : { "style" : "deepObject", "explode" : true }, "specific_dates_schedule" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "advance_invoice_schedules" : { "type" : "array", "description" : "

Resource object representing advance_invoice_schedule

", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule", "description" : "Resource object representing advance_invoice_schedule" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nTo collect a charge immediately, [use this API](/docs/api/v2/pcv-1/invoices/create-invoice-for-a-one-time-charge). \nIf any subscription changes happen before the end of the current term, these charges will be collected along with it.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this charge.\n", "maxLength" : 250, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ).\nProvide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* retail -\n\nTransaction is a sale to an end user\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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)\nintegration.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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)\nintegration.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge ends.\n", "example" : null } }, "required" : [ "description" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 from a subscription", "description" : "

Removes a scheduled change from a subscription.

Review the changes before removing them

To review the scheduled subscription change before removing it, call Retrieve with scheduled changes before calling this API to retrieve the subscription resource with the scheduled change applied.

\n

Prerequisites & Constraints

\n

Impacts

Subscription

    \n
  • Removes the scheduled change.
  • \n
  • Clears changes_scheduled_at, if set.
  • \n
  • Sets has_scheduled_changes to false.
  • \n

Invoices

Credit Notes

    \n
  • Creates the following credit notes against any advance invoices that account for the scheduled change:\n
      \n
    • adjustment: for amount_to_collect on the advance invoice.
    • \n
    • refundable: for the refundable amount on the advance invoice.
    • \n
    \n
  • \n
\n

Implementation Notes

Before you call this API, confirm the following:

\n

Related APIs

Retrieve with scheduled changes

List ramps

", "operationId" : "remove_scheduled_changes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "credit_notes" : { "type" : "array", "description" : "

Resource object representing credit_note

", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Use this endpoint to adjust when a subscription's current term or trial ends without altering the plan or billing frequency. It is helpful when you need to align renewals to a specific calendar date or extend a trial. Future renewals will follow the new date, keeping the subscription cadence intact.

\n\n\n

Prerequisites & Constraints

Subscriptions must be in one of the following status values: in_trial, active, non_renewing.

\n

Impacts

Subscription

Based on the subscription's status, the following updates are made:

    \n
  • If the status is in_trial, the trial_end is set to the new date.
  • \n
  • If the status is active, the current_term_end is set to the new date.
  • \n
  • If the status is non_renewing, the upcoming cancellation date is set to the new date.
  • \n

Invoices and Credit Notes

The API can generate unbilled charges, invoice, or credit notes. You can control the behaviour using prorate and invoice_immediately parameters.\nTo preview invoices, credits, and dates, use the Change term end estimate endpoint.

Advance Charges

If there are advance charges, then credit notes are issued for the unused portion of the service period.

Scheduled Pause

If the subscription is scheduled to pause at the end of the current term, the pause date is updated to match the new term end date.

Ramps

If subscription ramps are present, this operation moves them to the draft state. Update and reschedule the ramps as needed to keep them in sync.

\n

Implementation Notes

The request fails with invalid_state if the subscription is not in one of the trial, active, or non_renewing states. Validate the status before invoking this API.

", "operationId" : "change_term_end", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "term_ends_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which the current term should end for this subscription. The value must be a date in the future, i.e. later than current time. The value must not be the same as next_billing_at\n.

", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "Applicable for *active*\n/ *non_renewing*\nsubscriptions. If specified as *true*\nprorated charges / credits will be added during this operation.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "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.\nThe default value is as per the site settings\n.

\n

Note:\ninvoice_immediately\nonly 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

.

", "example" : null } }, "required" : [ "term_ends_at" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null }, "credit_notes" : { "type" : "array", "description" : "

Resource object representing credit_note

", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 a specified subscription.

This operation schedules the subscription resource for deletion, and it is permanently deleted after a few minutes.\nIf you wish to retain the subscription data but stop further renewals, consider canceling or pausing the subscription instead.

\n

Prerequisites & Constraints

\n

Impacts

Invoices

    \n
  • All the invoices belonging to the subscription are deleted.
  • \n
  • See Delete an invoice API for more details on the impacts of deleting an invoice.
  • \n

Credit notes

All the credit notes belonging to this subscription are deleted.

Transactions

All the transactions belonging to this subscription are deleted.

Usages

All usages belonging to this subscription are deleted.

Usage events

Deleting a subscription does not delete the associated usage events.

Reporting

The numbers in the following reports are modified when a subscription is deleted: Payments, New Revenue, Signups, Activations, Cancellations, and Refunds.

Integrations

Deleting a subscription may affect any third-party integrations you may have with Chargebee Billing. Review all integrations to assess the impact before proceeding.

\n

Implementation Notes

Before deleting a subscription, ensure the following:

\n

Related APIs

Pause a subscription

Cancel a subscription

", "operationId" : "delete_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 a subscription", "description" : "

Note:\nThis endpoint optionally supports 3DS. To use it create\na payment_intent\nand provide it via this endpoint.

Creates a new subscription for an existing customer in Chargebee. Any available credits and excess payments for the customer are automatically applied on the invoice.

", "operationId" : "create_subscription_for_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity this subscription should be linked 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

An alternative way of passing this parameter is by means of a custom HTTP header.

\n", "maxLength" : 50, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\nSet it to 0\nto have no trial period.

", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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 or not.

\n", "minimum" : 0, "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Defines Net D\nfor the subscription. Net D is the number of days from invoice.date until payment for the invoice is due.

\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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:

\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n", "enum" : [ "on", "off" ], "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* sepa_credit -\n\nSEPA Credit\n\\* cash -\n\nCash\n\\* no_preference -\n\nNo Preference\n\\* bank_transfer -\n\nBank Transfer\n\\* check -\n\nCheck\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* custom -\n\nCustom\n\\* boleto -\n\nBoleto\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n", "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" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Id of the payment source to be attached to this subscription.\n", "maxLength" : 40, "example" : null }, "override_relationship" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, ignores the hierarchy relationship\nand uses customer as payment and invoice owner.

", "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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\nis set to true\n, 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\nand line_item_taxes\nare computed based on the tax configuration as of invoice_date.\nWhen passing this parameter, the following prerequisites must be met:

\n", "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "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.\nThe default value is as per the site settings\n.

\n

Note:\ninvoice_immediately\nonly 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

.

", "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The period of time by which the first term of the subscription is extended free of charge. The value is expressed in the time unit specified by free_period_unit. For example, 3 with free_period_unit = month adds 3 free months to the first term of the subscription.

", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The time unit for free_period.

\n

Constraints

\nMust be equal to or lower than the period_unit of the plan item price of the subscription.

\n* week -

Charge based on week(s)

\n* month -

Charge based on month(s)

\n* day -

Charge based on day(s)

\n* year -

Charge based on year(s)

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "create_pending_invoices" : { "type" : "boolean", "deprecated" : false, "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.\nYou can also set this to true explicitly using the create/update subscription operations. This is useful in the following scenarios:

\n", "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "

Set to false\nto override for this subscription, the site-level setting\nfor 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\n.

", "example" : null }, "first_invoice_pending" : { "type" : "boolean", "default" : false, "deprecated" : false, "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 for the previous cycle.\nIf 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 or via an API call. This parameter can be passed only when the create_pending_invoices is true\n.

", "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "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)\nhas 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.\n\\* activate_subscription -\n\nThe subscription activates and charges are raised for non-metered items.\n\\* cancel_subscription -\n\nThe subscription cancels.\n\\* plan_default -\n\nThe action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n\\* site_default -\n\nThis is the default value. The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\\* customer -\n\nPass this value to indicate that the request is initiated by the customer\n\\* merchant -\n\nPass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Parameters for statement_descriptor\n", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment transaction descriptor text to help your customer easily recognize the transaction. When this value is passed this will override the [transaction descriptor](https://www.chargebee.com/docs/2.0/transaction_descriptors.html)\ntext configured in the Chargebee site for all the subscription renewal transactions.\n", "maxLength" : 65000, "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "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.\n\\* card -\n\ncard\n\\* twint -\n\nPayments made via Twint\n\\* dotpay -\n\ndotpay\n\\* faster_payments -\n\nFaster Payments\n\\* upi -\n\nupi\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* klarna -\n\nPayments made via Klarna.\n\\* payme -\n\nPayments made via PayMe\n\\* google_pay -\n\ngoogle_pay\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* pix -\n\nPix\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* ideal -\n\nideal\n\\* boleto -\n\nboleto\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* direct_debit -\n\ndirect_debit\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* bancontact -\n\nbancontact\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* qpay -\n\nPayments made via Qpay.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* dana -\n\nPayments made via Dana.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* swish -\n\nPayments made via Swish\n\\* go_pay -\n\nPayments made via GoPay\n\\* trustly -\n\nTrustly\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* venmo -\n\nVenmo\n\\* alipay -\n\nPayments made via Alipay.\n\\* tamara -\n\nPayments made via Tamara.\n\\* pay_to -\n\nPayTo\n\\* pay_co -\n\nPayments made via PayCo\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* paypay -\n\nPayPay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* pay_by_bank -\n\nPay By Bank\n\\* apple_pay -\n\napple_pay\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* gcash -\n\nPayments made via GCash.\n\\* giropay -\n\ngiropay\n\\* sofort -\n\nsofort\n\\* amazon_payments -\n\nAmazon Payments\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* cancel -

Contract term completes and subscription is canceled.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - ", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "billing_override" : { "type" : "object", "deprecated" : false, "description" : "Specify limits on how credits and payments are applied to individual invoices for the subscription. Contact \\[Support\\](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api\\&utm_medium=content\\&utm_campaign=support) to enable this feature. Note: These limits do not apply to \\[consolidated invoices\\](https://www.chargebee.com/docs/2.0/consolidated-invoicing.html) .\n", "properties" : { "max_excess_payment_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of excess payments that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n", "minimum" : -1, "example" : null }, "max_refundable_credits_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of refundable credits that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n", "minimum" : -1, "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Sub Item Plan Unit Amount for create subscription\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "Sub Item Plan Unit Amount in Decimal for create subscription\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* immediately -

The item is charged immediately on being added to the subscription.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "usage_accumulation_reset_frequency" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies the frequency at which the usage counter needs to be reset.\n\\* subscription_billing_frequency -\n\nAccumulates usage until the subscription's billing frequency ends.\n\\* never -\n\nAccumulates usage without ever resetting it.\n", "enum" : [ "never", "subscription_billing_frequency" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* 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\nand period_unit\n.

\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/subscriptions)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_override" : { "style" : "deepObject", "explode" : true }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 one or more [unbilled charges](/docs/api/unbilled_charges) into an existing subscription. Use this operation to add usage-based or other unbilled charges recorded in external systems to the subscription. \n\n### Prerequisites \\& Constraints\n\nIf you are trying to use this operation on your live site, ensure you have requested [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable it, otherwise the API will return an \"API not enabled\" error. \n\n### Impacts\n\n**Invoicing** \n* Unbilled charges on the subscription are automatically invoiced on the next renewal.\n* You can also invoice unbilled charges on-demand using the [Create an invoice for unbilled charges API](/docs/api/unbilled_charges/create-an-invoice-for-unbilled-charges). \n**Accounting Integrations** \nImported unbilled charges will not sync with your [accounting integration](https://www.chargebee.com/docs/billing/2.0/integrations/finance-integration-index) until they are invoiced.\n", "operationId" : "import_unbilled_charges", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for unbilled_charges\n", "properties" : { "id" : { "type" : "array", "description" : "Uniquely identifies an unbilled charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "Start date of this charge.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "End date of this charge.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "The identifier of the modelled entity this charge is based on. Will be null for 'adhoc' entity type.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Detailed description about this charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "Unit amount of the charge item.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the item which is represented by this charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Total amount of this charge. Typically equals to unit amount x quantity.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "discount_amount" : { "type" : "array", "description" : "Total discounts for this charge.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "use_for_proration" : { "type" : "array", "description" : "If the unbilled charge falls within the subscription's current term it will be used for proration.\n", "items" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "example" : null }, "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.\n", "items" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "date_from", "date_to", "entity_type" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "unbilled_charge_id" : { "type" : "array", "description" : "Uniquely identifies an unbilled charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "item_level_discount", "document_level_discount" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "

When the deduction is due to a coupon\n, then this is the id\nof the coupon. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this deduction.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "required" : [ "amount" ], "example" : null }, "tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tiers\n", "properties" : { "unbilled_charge_id" : { "type" : "array", "description" : "Uniquely identifies an unbilled charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "quantity_used" : { "type" : "array", "description" : "The number of units purchased in a range.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "quantity_used_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null } }, "required" : [ "unbilled_charge_id" ], "example" : null } }, "example" : null }, "encoding" : { "discounts" : { "style" : "deepObject", "explode" : true }, "tiers" : { "style" : "deepObject", "explode" : true }, "unbilled_charges" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "unbilled_charges" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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**. \n**Warning**\nThis API will return an error when [multi-frequency billing](/docs/api/subscriptions) is enabled.\n", "operationId" : "remove_scheduled_resumption", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|(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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Imports an active or historical contract term for a subscription.

Use this operation to import contract terms when migrating subscriptions from another billing system, or to add historical contract term data for existing subscriptions. You can import both active contract terms (currently running) and historical contract terms (completed, canceled, or terminated).

\n

Prerequisites & Constraints

\n

Impacts

Contract term

    \n
  • A new contract_term resource is created and associated with the subscription.
  • \n
  • For active contract terms:
  • \n
  • the total_contract_value is calculated as the sum of the contract estimate and the total_amount_raised parameter.
  • \n
  • The contract_end date is calculated based on the contract_start date and the billing_cycle parameter.
  • \n
\n

Implementation Notes

", "operationId" : "import_contract_term", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-f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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of billing cycles the new contract term should run for when the contract term renews. This value is used when action_at_term_end is renew or renew_once.

\n

Constraints

\n

Default value

", "maximum" : 100, "minimum" : 1, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier for the contract term in the site. \n**Default value**\n\n* If not provided, a unique identifier is automatically generated.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date when the contract term was created.

\n

Required if

\n

Constraints

\n

Default value

", "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The start date of the contract term.

\n

Constraints

", "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The end date of the contract term.

\n

Required if

\n

Constraints

", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Current status of the contract term. Use active for currently running contract terms, or completed, cancelled, or terminated for historical contract terms.

\n* active -

An actively running contract term.

\n

Prerequisite

\n* completed -

The contract term has run its full duration.

\n* cancelled -

The contract term was ended because a change in the subscription caused a subscription term reset, or the subscription was canceled due to non-payment.

\n* terminated -

The contract term was terminated ahead of completion.

", "enum" : [ "active", "completed", "cancelled", "terminated" ], "example" : null }, "total_amount_raised" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The amount raised for the contract term up to the time of importing the subscription. This amount is added to the contract estimate to calculate the total_contract_value for active contract terms.

\n

Required if

\n

Constraints

", "minimum" : 0, "example" : null }, "total_amount_raised_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The amount raised for the contract term up to the time of importing the subscription, excluding tax. This amount is added to the contract estimate to calculate the total_contract_value_before_tax for active contract terms.

\n

Required if

\n

Constraints

", "minimum" : 0, "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The sum of the totals of all invoices raised as part of the contract term.\nFor active contract terms, this is a predicted value calculated as the sum of the contract estimate and total_amount_raised.

\n

Required if

\n

Constraints

", "minimum" : 0, "example" : null }, "total_contract_value_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The total amount of revenue expected to be generated from the contract term, calculated as the sum of all invoices raised during the term, excluding taxes. For active contract terms, this is calculated as the sum of the contract estimate (before tax) and total_amount_raised_before_tax.

\n

Required if

\n

Constraints

", "minimum" : 0, "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of billing cycles of the subscription that the contract term covers.

\n

Required if

\n

Constraints

\n

Default value

", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

The contract term completes and the subscription continues to renew without a new contract term.

\n* renew_once -

The contract term completes and a new contract term is started for the number of billing cycles specified in contract_term_billing_cycle_on_renewal. The action_at_term_end for the new contract term is set to cancel, so the subscription is canceled when the new contract term completes.

\n* cancel -

The contract term completes and the subscription is canceled.

\n* renew -

The contract term completes and a new contract term is started for the number of billing cycles specified in contract_term_billing_cycle_on_renewal. The action_at_term_end for the new contract term is set to renew.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end during which the customer is barred from canceling the contract term. The customer can 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.

\n

Required if

\n

Constraints

", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm", "description" : "

Resource object representing contract_term

" } }, "required" : [ "contract_term" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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. \nWhen you don't pass any input param for this API, payment source and auto collection for the subscription will be the same as the customer's default settings.\n", "operationId" : "override_billing_profile", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the payment source to be attached to this subscription.\n", "maxLength" : 40, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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. \n**Warning**\nThis API will return an error when [multi-frequency billing](/docs/api/subscriptions) is enabled.\n", "operationId" : "remove_scheduled_pause", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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**\nThis API will return an error when [multi-frequency billing](/docs/api/subscriptions#subscription-billing-frequencies) is enabled.\n\nModifies the [advance invoicing schedule](/docs/api/advance_invoice_schedules) for a subscription.\n", "operationId" : "edit_advance_invoice_schedule", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[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,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles in one interval.\n", "minimum" : 1, "example" : null }, "schedule_type" : { "type" : "string", "deprecated" : false, "description" : "The type of advance invoice or advance invoicing schedule.\n\\* specific_dates -\n\nCharge on [specific dates](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_date).\nFor each date, specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_terms_to_charge)\nto charge for. Up to 5 dates can be configured.\n\\* fixed_intervals -\n\nCharge at fixed intervals of time. Specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#terms_to_charge)\nthat constitute an interval and the number of [days before each interval](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_days_before_renewal)\nthat the invoice should be generated. Also specify [when the schedule should end](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_end_schedule_on)\n.\n", "enum" : [ "specific_dates", "fixed_intervals" ], "example" : null }, "fixed_interval_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for fixed_interval_schedule\n", "properties" : { "number_of_occurrences" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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\nof the subscription. This parameter is applicable only when fixed_interval_schedule[end_schedule_on]\n= after_number_of_intervals

", "minimum" : 1, "example" : null }, "days_before_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before each interval that advance invoices are generated.\n", "minimum" : 1, "example" : null }, "end_schedule_on" : { "type" : "string", "deprecated" : false, "description" : "

Specifies when the schedule should end.

\n* after_number_of_intervals -

Advance invoices are generated a specified number of times

\n* subscription_end -

Advance invoices are generated for as long as the subscription is active.

\n* specific_date -

End the advance invoicing schedule on a specific date\n.

", "enum" : [ "after_number_of_intervals", "specific_date", "subscription_end" ], "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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]\n= specific_date\n.

", "example" : null } }, "example" : null }, "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for specific_dates_schedule\n", "properties" : { "id" : { "type" : "array", "description" : "The [unique id](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#id)\nof the member of the [advance_invoice_schedule](/docs/api/advance_invoice_schedules)\narray which corresponds to the [specific_dates_schedule](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule)\nthat you intend to modify. Only applicable when [schedule_type](/docs/api/subscriptions/edit-advance-invoice-schedule#schedule_type)\nis specific_dates.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "array", "description" : "

The number of billing cycles to charge for, on the date specified. Applicable only when schedule_type\nis specific_dates.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "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\nis specific_dates\n.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "fixed_interval_schedule" : { "style" : "deepObject", "explode" : true }, "specific_dates_schedule" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "advance_invoice_schedules" : { "type" : "array", "description" : "

Resource object representing advance_invoice_schedule

", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule", "description" : "Resource object representing advance_invoice_schedule" }, "example" : null } }, "required" : [ "advance_invoice_schedules" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nresources currently attached\nto a specific subscription. The list is sorted in descending order based on the created_at\ntimestamp.

Note\nThis endpoint does not return coupon or coupon_code resources.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "discount" : { "$ref" : "#/components/schemas/Discount", "description" : "Resource object representing discount" } }, "required" : [ "discount" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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. \n**Warning**\nThis API will return an error when [multi-frequency billing](/docs/api/subscriptions) is enabled.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending (earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm", "description" : "Resource object representing contract_term" } }, "required" : [ "contract_term" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Use this API to pause an active or non-renewing subscription. When a subscription is paused, it does not renew, and Chargebee does not generate renewal invoices for it. This allows you to temporarily suspend a customer's service without canceling the subscription.

\n\n\n

Prerequisites & Constraints

\n

Impacts

Subscription

If the pause_option parameter is set to immediately, the subscription's status changes to paused. The next_billing_at, pause_date, and resume_date values are updated based on the input parameters.

Unbilled Charges

If the subscription has unbilled charges and is paused immediately, you can choose to leave the charges unbilled or invoice them. If invoiced, Chargebee attempts payment collection based on the customer's auto-collection settings. If payment fails or auto-collection is not enabled, the invoice is marked as unpaid.

Use the unbilled_charges_handling parameter to set your preference.

Dunning

If the subscription has unpaid invoices in dunning and is paused immediately, you can choose to either stop or continue the dunning process.

Use the invoice_dunning_handling parameter to set your preference.

Scheduled Ramps

Any future subscription ramps (such as price or quantity changes) effective on or after the pause date are automatically deleted.

Advanced Invoices

If the subscription has an advance invoice, Chargebee creates an adjustment credit note if the invoice is unpaid or in a payment-due state. If the invoice is already paid, a refundable credit note is created.

\n

Implementation Notes

Before calling this API, perform the following checks:

", "operationId" : "pause_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "pause_option" : { "type" : "string", "deprecated" : false, "description" : "

List of options to pause the subscription.

\n* billing_cycles -

Pause at the end of the current term, and resume automatically after the set number of billing cycles (in skip_billing_cycles) have been skipped

\n* immediately -

Pause immediately

\n* end_of_term -

Pause at the end of current term

\n* specific_date -

Pause on a specific date

", "enum" : [ "immediately", "end_of_term", "specific_date", "billing_cycles" ], "example" : null }, "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Date on which the subscription will be paused. Applicable when specific_date option is chosen in the pause_option field.\nFor non-renewing subscriptions, pause_date should be before the cancellation date.

", "example" : null }, "unbilled_charges_handling" : { "type" : "string", "deprecated" : false, "description" : "

Applicable when unbilled charges are present for the subscription and 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.

\n* invoice -

Invoice charges\nIf 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.

\n* no_action -

Retain as unbilled\nIf no_action is chosen, charges are added to the resumption invoice.

", "enum" : [ "no_action", "invoice" ], "example" : null }, "invoice_dunning_handling" : { "type" : "string", "deprecated" : false, "description" : "

Handles dunning for invoices already in the dunning cycle when a subscription is paused. Applicable when pause_option is set as immediately.\nIf invoice is in the dunning cycle, invoice_dunning_handing allows you to stop or continue dunning.

\n* continue -

Continue dunning

\n* stop -

Stop dunning

", "enum" : [ "continue", "stop" ], "example" : null }, "skip_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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\nis billing_cycles\n.

", "minimum" : 1, "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\nFor non-renewing subscriptions,resume_date should be before the cancellation date.

", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null }, "credit_notes" : { "type" : "array", "description" : "

Resource object representing credit_note

", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription_scheduled_change" : { "$ref" : "#/components/schemas/SubscriptionScheduledChange", "description" : "Resource object representing subscription_scheduled_change" } }, "required" : [ "subscription_scheduled_change" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "cancel_reason_code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "action_type" : { "type" : "string", "deprecated" : false, "enum" : [ "cancel", "pause", "reactivate" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription_scheduled_change" : { "$ref" : "#/components/schemas/SubscriptionScheduledChange", "description" : "Resource object representing subscription_scheduled_change" } }, "required" : [ "subscription_scheduled_change" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 specified customer.

This operation schedules the customer resource for deletion, and it is permanently deleted after a few minutes.

If you wish to retain the customer data but stop further subscription renewals, consider canceling or pausing the subscriptions instead.

\n

Prerequisites & Constraints

\n

Impacts

Subscriptions

    \n
  • All the subscriptions belonging to the customer are deleted.
  • \n
  • See Delete a subscription API for more details on the impacts of deleting a subscription.
  • \n

Invoices

    \n
  • All the invoices belonging to the customer are deleted.
  • \n
  • See Delete an invoice API for more details on the impacts of deleting an invoice.
  • \n

Credit notes

    \n
  • All the credit notes belonging to the customer are deleted.
  • \n

Payment sources

The payment sources linked to the customer are deleted and also removed from the payment gateway. To retain payment gateway records, pass delete_payment_method = false.

Reports

    \n
  • The numbers in the following reports are modified when a customer is deleted: Payments, New Revenue, Signups, Activations, Cancellations, and Refunds.
  • \n
\n

Implementation Notes

Before deleting a customer, ensure the following:

\n

Related APIs

Pause a subscription

Cancel a subscription

Unlink a customer from its parent account

", "operationId" : "delete_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "delete_payment_method" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Deletes the Payment Method from the gateway/vault.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Creates a hierarchical relationship between two customers. The path parameter customer_id identifies the child in this relationship, and parent_id identifies the parent.

Note

For the use_default_hierarchy_settings, parent_account_access, and child_account_access parameters in this operation, the term "parent" usually refers to payment_owner_id. If payment_owner_id is the same as customer_id, then "parent" refers to parent_id.

\n

Prerequisites & Constraints

\n

Impacts

Customer

Invoices

    \n
  • For all invoices generated for customer_id after you link the customer, Chargebee sets invoice.customer_id to invoice_owner_id.
  • \n

Transactions

    \n
  • When Chargebee generates invoices for customer_id, if auto_collection is on for invoice_owner_id, Chargebee uses the payment_source of the payment_owner_id to pay the invoices and creates transactions for the payment under payment_owner_id.
  • \n

RevenueStory

    \n
  • The Customer Insights report in RevenueStory shows parent-level views for customers with hierarchy relationships.
  • \n
", "operationId" : "link_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "parent_id" : { "type" : "string", "deprecated" : false, "description" : "

ID of the customer intended to be set as the immediate parent of the customer identified by customer_id\n.

", "maxLength" : 50, "example" : null }, "payment_owner_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the customer responsible for paying the invoices for the customer identified by customer_id.

\n

Constraints

", "maxLength" : 50, "example" : null }, "invoice_owner_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the customer who receives the invoice for charges incurred by the customer identified by customer_id.

\n

Constraint

", "maxLength" : 50, "example" : null }, "use_default_hierarchy_settings" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "

Decides if Chargebee should apply settings from the Chargebee Billing UI or from this API request.

\n", "example" : null }, "parent_account_access" : { "type" : "object", "deprecated" : false, "description" : "Settings for the parent account's access.\n", "properties" : { "portal_edit_child_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Determines the parent's access to the child's subscriptions in the Self-Serve Portal.\n\\* yes -\n\nThe parent can view and edit the child's subscriptions.\n\\* no -\n\nThe parent can't view or edit the child's subscriptions.\n\\* view_only -\n\nThe parent can only view the child's subscriptions.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "portal_download_child_invoices" : { "type" : "string", "deprecated" : false, "description" : "Determines the parent's access to the child's invoices in the Self-Serve Portal.\n\\* no -\n\nThe parent can't view or download the child's invoices.\n\\* view_only -\n\nThe parent can view but not download the child's invoices.\n\\* yes -\n\nThe parent can both view and download the child's invoices.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If set to true\n, the parent receives email notifications for the child's subscriptions.

", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If set to true\n, the parent receives email notifications for payment-related activities on the child's invoices.

", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If set to true\n, the parent receives email notifications for the child's invoices.

", "example" : null } }, "example" : null }, "child_account_access" : { "type" : "object", "deprecated" : false, "description" : "Settings for the child account's access.\n", "properties" : { "portal_edit_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own subscriptions in the Self-Serve Portal.\n\\* view_only -\n\nThe child account can only view its subscriptions.\n\\* yes -\n\nThe child account can view and edit its subscriptions.\n", "enum" : [ "yes", "view_only" ], "example" : null }, "portal_download_invoices" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own invoices in the Self-Serve Portal.\n\\* yes -\n\nThe child account can both view and download its invoices.\n\\* view_only -\n\nThe child account can view but not download its invoices.\n\\* no -\n\nThe child account cannot view or download its own invoices.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If set to true\n, the child account receives email notifications for its subscriptions.

", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If set to true\n, the child account receives email notifications for payment-related activities for its invoices.

", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If set to true\n, the child account receives email notifications for its invoices.

", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "child_account_access" : { "style" : "deepObject", "explode" : true }, "parent_account_access" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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)\n, this operation detaches the customer from its parent. The hierarchy, if any, beneath the customer remains unchanged.\n", "operationId" : "delink_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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])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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "contact" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contact\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for the contact.\n", "maxLength" : 150, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "contact" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 or unassign the primary or backup payment role for a payment source.

Set role when creating a payment source

You can also assign a payment source as primary when you create it using APIs such as:

Payment collection precedence

Chargebee uses the following precedence to determine which payment source to use when it collects payments for a subscription:

\n

Prerequisites & Constraints

\n

Impacts

Payment collection

The roles that you set using this API apply to all payments collected for the customer, except for subscriptions that have a payment source attached to them. Chargebee continues to collect such payments using the payment source attached to the subscription.

Customer

    \n
  • When you assign a payment source as primary, Chargebee unassigns the existing primary payment source and doesn't affect the backup payment source.
  • \n
  • When you assign a payment source as backup, Chargebee unassigns the existing backup payment source and doesn't affect the primary payment source.
  • \n
  • You can set the role of a backup payment source to primary or none.
  • \n
  • You cannot set the role of a primary payment source to either backup or none.
  • \n
\n

Implementation Notes

Before you call this API, ensure the following:

", "operationId" : "assign_payment_role", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source id this role will be assigned to.\n", "maxLength" : 40, "example" : null }, "role" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether the payment source is Primary, Backup, or neither.\n\\* backup -\n\nBackup\n\\* none -\n\nNone\n\\* primary -\n\nPrimary\n", "enum" : [ "primary", "backup", "none" ], "example" : null } }, "required" : [ "payment_source_id", "role" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Prerequisites

", "operationId" : "move_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id_at_from_site" : { "type" : "string", "deprecated" : false, "description" : "Id of the customer to be copied.\n", "maxLength" : 100, "example" : null }, "from_site" : { "type" : "string", "deprecated" : false, "description" : "Name of the site from which this customer need to be copied.\n", "maxLength" : 50, "example" : null } }, "required" : [ "from_site", "id_at_from_site" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "resource_migration" : { "$ref" : "#/components/schemas/ResourceMigration", "description" : "

Resource object representing resource_migration

" } }, "required" : [ "resource_migration" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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)\nfor a customer.\n", "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}\n.

\n* complete_hierarchy -

Retrieve all nodes in the account hierarchy.

\n* subordinates -

Retrieve all nodes in the account hierarchy that start from the specified customer (identified by {customer_id}\n) and include its subordinates. In other words, get nodes in the account hierarchy tree where the root node is the specified customer.

\n* path_to_root -

Retrieve nodes from the specified customer (identified by {customer_id}\n) 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" ], "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hierarchies" : { "type" : "array", "description" : "

Resource object representing hierarchy

", "items" : { "$ref" : "#/components/schemas/Hierarchy", "description" : "Resource object representing hierarchy" }, "example" : null } }, "required" : [ "hierarchies" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Payment Sources\ncomes with additional options and improvements to the Card APIs\n. For this operation, use the Create using temporary token\nAPI or Create using permanent token\nAPI under Payment Sources to update payment method for the customer.

Updates payment method details for a customer.

Note:\nIf 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\nAPI under Cards resource. This API is not supported for Chargebee Test Gateway, it is provided to help you understand the billing workflow in Chargebee.

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.

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.

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

Reference id format for Card Payments\nThe format of reference_id will differ based on where the card is stored.

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.

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.

Spreedly Card vault: If the card details are stored in Spreedly vault, then you need to provide the Spreedly token as reference_id.

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

Reference id format for Direct Debit Payments\nThe format of reference_id will differ based on where the bank account is stored.

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.

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.

GoCardless: The reference_id is the GoCardless Customer Mandate ID (e.g. MD0077Z99TTQXK).

Note: While using this API to update payment method details, Card Verification will not happen even if it is enabled for that particular gateway.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_method\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* paypay -\n\nPayments made via PayPay\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* go_pay -\n\nPayments made via GoPay\n\\* dana -\n\nPayments made via Dana.\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* upi -\n\nUPI Payments.\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* klarna -\n\nPayments made via Klarna.\n\\* gcash -\n\nPayments made via GCash.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* qpay -\n\nPayments made via Qpay.\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* pix -\n\nPayments made via Pix\n\\* pay_by_bank -\n\nPay By Bank\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* sofort -\n\nPayments made via Sofort.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* twint -\n\nPayments made via Twint\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* tamara -\n\nPayments made via Tamara.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* payme -\n\nPayments made via PayMe\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* pay_to -\n\nPayments made via PayTo\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* pay_co -\n\nPayments made via PayCo\n\\* swish -\n\nPayments made via Swish\n\\* trustly -\n\nTrustly\n\\* venmo -\n\nPayments made via Venmo\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* giropay -\n\nPayments made via giropay.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor 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:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 65000, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "

ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

If you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, then XI\n(the code for United Kingdom - Northern Ireland\n) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "required" : [ "type" ], "example" : null } }, "example" : null }, "encoding" : { "payment_method" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 details of the specified customer.

Use this API to modify customer information, including standard attributes and any configured custom attributes.

\n

Impacts

Invoices

    \n
  • See auto_collection parameter to understand the impact on invoices.
  • \n
  • See taxability parameter to understand how taxes on invoices are impacted.
  • \n

CRM integrations

When you update customer details in Chargebee using this API, the corresponding records are synced with integrated CRM systems, such as HubSpot or Salesforce, depending on your integration configuration.

\n

Related APIs

Update billing info for a customer

Link a customer to an account

Unlink a customer from its parent account

", "operationId" : "update_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "preferred_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.\n", "maxLength" : 3, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer.\n", "maxLength" : 50, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "auto_collection" : { "type" : "string", "default" : "on", "deprecated" : false, "description" : "Determines whether payments should be collected automatically for this customer. \n**Note**\nThis setting can be overridden at the [subscription level](/docs/api/subscriptions/update-subscription-for-items#auto_collection).\n\\* on -\n\nPayments are automatically collected for new invoices. For existing invoices, Chargebee attempts collections through [dunning](https://www.chargebee.com/docs/payments/2.0/dunning/dunning-v2) as per the configured schedule.\n\\* off -\n\nPayments are not automatically collected for this customer.\n", "enum" : [ "on", "off" ], "example" : null }, "allow_direct_debit" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the customer can pay via Direct Debit.\n", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

\n", "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "

Specifies whether taxes are applicable to invoices generated for this customer.

\n* taxable -

Taxes are calculated for this customer based on the site's tax configuration.\nIn some regions, shipping_address is required for tax computation.\nIf a shipping address is not provided, the billing_address is used. If neither address is available, no tax is applied.

\n* exempt -

The customer is exempt from tax.

\n", "enum" : [ "taxable", "exempt" ], "example" : null }, "exemption_details" : { "type" : "array", "deprecated" : false, "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)\nintegration.\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.\n", "items" : { "example" : null }, "example" : null }, "customer_type" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* senior_citizen -\n\nWhen 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\n\\* industrial -\n\nWhen the purchase is made by an industrial business\n\\* business -\n\nWhen the purchase is made at a place of business\n\\* residential -\n\nWhen the purchase is made by a customer for home use\n", "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null }, "client_profile_id" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n", "maxLength" : 50, "example" : null }, "taxjar_exemption_category" : { "type" : "string", "deprecated" : false, "description" : "Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration.\n\\* government -\n\nGovernment\n\\* other -\n\nOther\n\\* wholesale -\n\nWhole-sale\n", "enum" : [ "wholesale", "government", "other" ], "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "entity_code" : { "type" : "string", "deprecated" : false, "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)\n.\n\\* med2 -\n\nUS Medical Device Excise Tax with taxable sales tax\n\\* med1 -\n\nUS Medical Device Excise Tax with exempt sales tax\n\\* d -\n\nForeign diplomat\n\\* e -\n\nCharitable or benevolent organization\n\\* f -\n\nReligious organization\n\\* g -\n\nResale\n\\* a -\n\nFederal government\n\\* b -\n\nState government\n\\* c -\n\nTribe/Status Indian/Indian Band\n\\* l -\n\nOther or custom\n\\* m -\n\nEducational organization\n\\* n -\n\nLocal government\n\\* h -\n\nCommercial agricultural production\n\\* i -\n\nIndustrial production/manufacturer\n\\* j -\n\nDirect pay permit\n\\* k -\n\nDirect mail\n\\* p -\n\nCommercial aquaculture\n\\* q -\n\nCommercial Fishery\n\\* r -\n\nNon-resident\n", "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "exempt_number" : { "type" : "string", "deprecated" : false, "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)\n.\n", "maxLength" : 100, "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the customer.\n\\* custom -\n\nCustom\n\\* bank_transfer -\n\nBank Transfer\n\\* boleto -\n\nBoleto\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* sepa_credit -\n\nSEPA Credit\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* no_preference -\n\nNo Preference\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n", "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" ], "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "Override for this customer, the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing)\nfor 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/subscription-object#auto_close_invoices)\nwhich takes precedence.\n", "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null }, "fraud_flag" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether or not the customer has been identified as fraudulent.\n\\* fraudulent -\n\nThe customer has been marked as fraudulent\n\\* safe -\n\nThe customer has been marked as safe\n", "enum" : [ "safe", "fraudulent" ], "example" : null }, "consolidated_invoicing" : { "type" : "boolean", "deprecated" : false, "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. This parameter can be provided only when Consolidated Invoicing is enabled.

\n

Note:

Any invoices raised when a subscription activates from in_trial or future status, are not consolidated by default. Contact Support to enable consolidation for such invoices.

\n

.

", "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_detail" : { "get" : { "summary" : "Get paginated account hierarchy for a customer", "description" : "Retrieves the [account hierarchy tree](/docs/api/hierarchies)\nfor the customer.\n", "operationId" : "list_hierarchy_details", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]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]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "

Used for pagination. Set this to the next_offset\nvalue from the previous API response to fetch the next page.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "hierarchy_operation_type", "in" : "query", "description" : "Specifies which part of the hierarchy to fetch. Choose from the available operation types.\n\\* complete_hierarchy -\n\nFetches all nodes in the full hierarchy that the customer belongs to.\n\\* subordinates -\n\nFetches all nodes in the sub-hierarchy rooted at the customer, including the customer and its subordinates.\n\\* path_to_root -\n\nFetches a list of nodes along the path from the customer to the root of the hierarchy.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "enum" : [ "complete_hierarchy", "subordinates", "path_to_root" ], "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "hierarchy" : { "$ref" : "#/components/schemas/Hierarchy", "description" : "Resource object representing hierarchy" } }, "required" : [ "hierarchy" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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*. \nDuring this operation the upcoming renewal dates are **not** updated to align immediately with the new date. The alignment will happen during subsequent renewals.\nFor example, a customer's upcoming renewal is scheduled for *January 10th* , when the customer's billing date is changed to the *15th* , the next renewal date is still *January 10th* . The new billing date does not take effect until the subsequent renewal, which in this case is *February 15th* .\nIf you want to align with the new date immediately (in this example: you want the next renewal to be on *January 15th* and not *January 10th* ) you need to manually [change the subscription's term end](/docs/api/subscriptions/change-term-end).\n", "operationId" : "change_billing_date", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "billing_date" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Applicable when *calendar billing*\n(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.\n", "maximum" : 31, "minimum" : 1, "example" : null }, "billing_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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

For example, the renewals happen on 15th July when billing_month is 7 and billing_date is 15.

\n

Note\nApplicable when Calendar Billing (with customer-specific billing date support) is enabled and billing_date_mode is manually_set.

", "maximum" : 12, "minimum" : 1, "example" : null }, "billing_date_mode" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether this customer's *billing_date*\nvalue is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_date*\nwill not be reset even when all of the monthly/yearly subscriptions are cancelled.\n\\* manually_set -\n\nBilling date is specifically set (default configuration is overridden)\n\\* using_defaults -\n\nBilling date is set based on defaults configured.\n", "enum" : [ "using_defaults", "manually_set" ], "example" : null }, "billing_day_of_week" : { "type" : "string", "deprecated" : false, "description" : "Applicable when *calendar billing*\n(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.\n\\* sunday -\n\nSunday\n\\* wednesday -\n\nWednesday\n\\* tuesday -\n\nTuesday\n\\* monday -\n\nMonday\n\\* saturday -\n\nSaturday\n\\* friday -\n\nFriday\n\\* thursday -\n\nThursday\n", "enum" : [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ], "example" : null }, "billing_day_of_week_mode" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether this customer's *billing_day_of_week*\nvalue is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_day_of_week*\nwill not be reset even when all of the weekly subscriptions are cancelled.\n\\* manually_set -\n\nBilling date is specifically set (default configuration is overridden)\n\\* using_defaults -\n\nBilling date is set based on defaults configured.\n", "enum" : [ "using_defaults", "manually_set" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_customers", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"9bsvnHgsvmsI\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "9bsvnHgsvmsI", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "first_name", "in" : "query", "description" : "optional, string filter\n\nFirst name of the customer.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*first_name\\[is\\] = \"John\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "John", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "last_name", "in" : "query", "description" : "optional, string filter\n\nLast name of the customer.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*last_name\\[is\\] = \"Clint\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Clint", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "email", "in" : "query", "description" : "optional, string filter\n\nEmail of the customer. Configured email notifications will be sent to this email.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*email\\[is\\] = \"john@test.com\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "john@test.com", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "company", "in" : "query", "description" : "optional, string filter\n\nCompany name of the customer.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*company\\[is_not\\] = \"Globex Corp\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Globex Corp", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "phone", "in" : "query", "description" : "optional, string filter\n\nPhone number of the customer.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*phone\\[is_not\\] = \"(541) 754-3010\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "(541) 754-3010", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "auto_collection", "in" : "query", "description" : "optional, enumerated string filter\n\nWhether payments needs to be collected automatically for this customer. Possible values are : on, off.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*auto_collection\\[is\\] = \"on\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "on", "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.\n", "enum" : [ "on", "off" ], "example" : null }, "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.\n", "enum" : [ "on", "off" ], "example" : null }, "in" : { "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.\n", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null } } } }, { "name" : "taxability", "in" : "query", "description" : "optional, enumerated string filter\n\nSpecifies if the customer is liable for tax. Possible values are : taxable, exempt.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*taxability\\[is\\] = \"taxable\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "taxable", "properties" : { "is" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this customer resource is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[before\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.\nSupported operators :\nafter, before, on, between

\n

Example →\nupdated_at[after] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "offline_payment_method", "in" : "query", "description" : "optional, enumerated string filter\n\nThe preferred offline payment method for the customer. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*offline_payment_method\\[is\\] = \"cash\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "cash", "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\n", "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" ], "example" : null }, "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\n", "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" ], "example" : null }, "in" : { "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\n", "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" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "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" ], "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))*\\]$", "example" : null } } } }, { "name" : "auto_close_invoices", "in" : "query", "description" : "optional, boolean filter\n\nOverride for this customer, the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing)\nfor 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/subscription-object#auto_close_invoices)\nwhich takes precedence. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*auto_close_invoices\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "business_entity_id", "in" : "query", "description" : "optional, string filter\n\nThe unique ID of the [business entity](/docs/api/advanced-features)\nof this subscription. This is always the same as the\n[business entity](/docs/api/subscriptions/subscription-object#customer_id)\nof the customer.\n\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*business_entity_id\\[is_not\\] = \"business_entity_id\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "business_entity_id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } }, { "name" : "relationship", "in" : "query", "description" : "Parameters for relationship\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "parent_id" : { "type" : "object", "deprecated" : false, "description" : "Immediate parent with whom we will link our new customer(child)\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "payment_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to pay\n", "example" : "active1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "invoice_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to handle invoices\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card" } }, "required" : [ "customer" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Creates a customer resource. Optionally, creates a payment source for the customer.

Creating payment source

Although this operation supports creation of a customer with a payment source, it is recommended to use one of the Payment Source APIs to capture payment source details instead of using this operation. This way, even if payment source creation fails due to errors at the payment gateway, the customer resource can still be created successfully.

\n

Impacts

Customer

    \n
  • If the multi-business entity feature is enabled, the customer is linked to the business entity specified; otherwise, the customer record is linked to the default business entity defined for the site.
  • \n

Invoices

    \n
  • Chargebee uses the billing_address object from the customer to set the values in the billing_address of the invoices generated for the customer.
  • \n
  • If the billing_address object does not include the first_name, last_name, or company fields, Chargebee automatically uses the values from customer.first_name, customer.last_name, and customer.company (if available) when generating invoices.
  • \n

Payment source

    \n
  • If payment_intent or payment_method parameter is passed, a payment_source resource of the appropriate type is created for the customer.
  • \n
  • If bank_account parameter is passed, a payment_source resource of type direct_debit is created for the customer.
  • \n
  • If card parameter is passed, a payment_source resource of type card is created for the customer.
  • \n
Integrations
    \n
  • If CRM systems are connected to Chargebee, a corresponding record is created in the connected CRM (such as Salesforce, and HubSpot).
  • \n
\n

Use Cases

Create payment source using payment_intent

Use the payment_intent parameter to create a payment source for the customer. Using payment intents is the recommended way to create a payment source in Chargebee for both Strong Customer Authentication (SCA) (i.e. 3D-Secure) and non-SCA flows.

    \n
  1. Create a payment_intent resource by calling the Create a payment intent API.
  2. \n
  3. Pass the payment_intent object to your frontend and use Chargebee.js to capture the payment source details from the customer. Use Payment Method Helpers to show payment method UIs and collect payment method details from the customer.
  4. \n
  5. Listen to the payment_intent_updated event. Once the payment_intent.status is authorized, pass the payment_intent.id using the payment_intent[id] parameter in this API call.
  6. \n

Create payment source using payment_method

If you prefer to use the payment gateway's SDKs to capture the payment method details, you can then use the payment_method parameter in this API to pass the payment method token and other details.

    \n
  1. Use the JavaScript library of your payment gateway to capture the payment method details. Examples include:
  2. \n
    \n
  1. Pass the payment method token using the payment_method[reference_id] or payment_method[tmp_token] parameter along with any additional parameters required by the payment gateway to create the payment source.
  2. \n

Create payment source using bank_account

You can pass raw bank account details via this API. Use the bank_account parameter to pass the bank account details.

Create payment source using card

If you are PCI compliant, you can pass raw card details via this API. Use the card parameter to pass the card details.

\n

Related APIs

Update a customer

Update billing info for a customer

", "operationId" : "create_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id for the new customer. If not given, this will be auto-generated.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address of the customer. Configured email notifications are sent to this email address. Invalid email address will result in an error.\n", "maxLength" : 70, "example" : null }, "preferred_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (in [ISO 4217 format](https://www.iso.org/iso-4217-currency-codes.html)) of the customer.\n", "maxLength" : 3, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer.\n", "maxLength" : 50, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "auto_collection" : { "type" : "string", "default" : "on", "deprecated" : false, "description" : "Whether payments needs to be collected automatically for this customer.\n\\* on -\n\nWhenever an invoice is created, an automatic attempt to charge the customer's payment method is made.\n\\* off -\n\nAutomatic collection of charges will not be made. All payments must be recorded offline.\n", "enum" : [ "on", "off" ], "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

\n", "example" : null }, "allow_direct_debit" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the customer can pay via Direct Debit.\n", "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "

The VAT/tax registration number for the customer. For customers with billing_address

\n

country\nas\nXI\n(which is United Kingdom - Northern Ireland\n), the first two characters of the full VAT number\ncan be overridden by setting\nvat_number_prefix\n.

", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "

The standard used for specifying the entity_identifier_scheme.\nCurrently only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true\nthen the Reverse Charge Mechanism\nis applicable. This field is applicable only when Australian GST is configured for your site.

", "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the customer is e-invoiced. When set to true\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (billing_address.country\n). When set to false\n, the customer is not e-invoiced even if e-invoicing is enabled for their country.

\n

Tip:

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", "example" : null }, "einvoicing_method" : { "type" : "string", "deprecated" : false, "description" : "Determines whether to send an e-invoice manually or automatic.\n\\* automatic -\n\nUse this value to send e-invoice every time an invoice or credit note is created.\n\\* manual -\n\nWhen manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API.\n\\* site_default -\n\nThe default value of the site which can be overridden at the customer level.\n", "enum" : [ "automatic", "manual", "site_default" ], "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "

Specifies if the customer is liable for tax.

\n* taxable -

Computes tax for the customer based on the site configuration.\nIn 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.

\n* exempt - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "exemption_details" : { "type" : "array", "deprecated" : false, "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)\nintegration.\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.\n", "items" : { "example" : null }, "example" : null }, "customer_type" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* industrial -\n\nWhen the purchase is made by an industrial business\n\\* residential -\n\nWhen the purchase is made by a customer for home use\n\\* senior_citizen -\n\nWhen 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\n\\* business -\n\nWhen the purchase is made at a place of business\n", "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null }, "client_profile_id" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n", "maxLength" : 50, "example" : null }, "taxjar_exemption_category" : { "type" : "string", "deprecated" : false, "description" : "Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration.\n\\* other -\n\nOther\n\\* government -\n\nGovernment\n\\* wholesale -\n\nWhole-sale\n", "enum" : [ "wholesale", "government", "other" ], "example" : null }, "business_customer_without_vat_number" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is a valid business without an EU/UK VAT number.\n", "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "description" : "

Determines which region-specific language Chargebee uses to communicate with the customer. Use the language pack to customize the translations for each locale.

\n

Default behavior

", "maxLength" : 50, "example" : null }, "entity_code" : { "type" : "string", "deprecated" : false, "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)\n.\n\\* l -\n\nOther or custom\n\\* m -\n\nEducational organization\n\\* n -\n\nLocal government\n\\* h -\n\nCommercial agricultural production\n\\* i -\n\nIndustrial production/manufacturer\n\\* j -\n\nDirect pay permit\n\\* k -\n\nDirect mail\n\\* p -\n\nCommercial aquaculture\n\\* q -\n\nCommercial Fishery\n\\* r -\n\nNon-resident\n\\* d -\n\nForeign diplomat\n\\* e -\n\nCharitable or benevolent organization\n\\* f -\n\nReligious organization\n\\* g -\n\nResale\n\\* a -\n\nFederal government\n\\* b -\n\nState government\n\\* c -\n\nTribe/Status Indian/Indian Band\n\\* med2 -\n\nUS Medical Device Excise Tax with taxable sales tax\n\\* med1 -\n\nUS Medical Device Excise Tax with exempt sales tax\n", "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "exempt_number" : { "type" : "string", "deprecated" : false, "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)\n.\n", "maxLength" : 100, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the customer.\n\\* sepa_credit -\n\nSEPA Credit\n\\* cash -\n\nCash\n\\* no_preference -\n\nNo Preference\n\\* bank_transfer -\n\nBank Transfer\n\\* check -\n\nCheck\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* custom -\n\nCustom\n\\* boleto -\n\nBoleto\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n", "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" ], "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "Override for this customer, the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing)\nfor 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/subscription-object#auto_close_invoices)\nwhich takes precedence.\n", "example" : null }, "consolidated_invoicing" : { "type" : "boolean", "deprecated" : false, "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. This parameter can be provided only when Consolidated Invoicing is enabled.

\n

Note:

Any invoices raised when a subscription activates from in_trial or future status, are not consolidated by default. Contact Support to enable consolidation for such invoices.

\n

.

", "example" : null }, "token_id" : { "type" : "string", "deprecated" : false, "description" : "

The Chargebee payment token generated by Chargebee JS.

\n

Note:\nThe payment token created via Chargebee JS uses the gateway selected through Smart Routing.\nExplicitly passing a gateway_id\nin this API call will not override the gateway associated with the token.

", "maxLength" : 40, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the [business entity](/docs/api/advanced-features) this customer should be [linked](/docs/api/advanced-features) to. An alternative way of passing this parameter is by means of a [custom HTTP header](/docs/api/advanced-features). \n**Default behavior**\n\n* When not provided, the customer is linked to the [default business entity](/docs/api/advanced-features) defined for the site.\n", "maxLength" : 50, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card. Use this parameter to pass raw card details. Passing raw card data via API involves PCI liability at your end due to the sensitivity of the data.\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "

The gateway account in which these card details are stored.

\n

Required when

", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "The 16 digit credit card number. \nIf 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.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card scheme.\n\\* mastercard -\n\nA MasterCard scheme.\n\\* visa -\n\nA Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if billing_state_code\nis provided.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "bank_account" : { "type" : "object", "deprecated" : false, "description" : "Parameters for bank_account\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "

The gateway account in which this payment source is stored.

\n

Required when

", "maxLength" : 50, "example" : null }, "iban" : { "type" : "string", "deprecated" : false, "description" : "Account holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html)\nplatform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details)\n", "maxLength" : 50, "minLength" : 10, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's first name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's last name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Account holder's company name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 250, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "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.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the account holder that is linked to the bank account.\n", "maxLength" : 50, "example" : null }, "bank_name" : { "type" : "string", "deprecated" : false, "description" : "Name of account holder's bank.\n", "maxLength" : 100, "example" : null }, "account_number" : { "type" : "string", "deprecated" : false, "description" : "Account holder's bank account number.\n", "maxLength" : 17, "minLength" : 4, "example" : null }, "routing_number" : { "type" : "string", "deprecated" : false, "description" : "Bank account routing number.\n", "maxLength" : 9, "minLength" : 3, "example" : null }, "bank_code" : { "type" : "string", "deprecated" : false, "description" : "Indicates the bank code.\n", "maxLength" : 20, "example" : null }, "account_type" : { "type" : "string", "deprecated" : false, "description" : "Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/)\nACH and Razorpay NetBanking users only. If not passed, account type is taken as null.\n\\* checking -\n\nChecking Account\n\\* business_checking -\n\nBusiness Checking Account\n\\* savings -\n\nSavings Account\n\\* current -\n\nCurrent Account\n", "enum" : [ "checking", "savings", "business_checking", "current" ], "example" : null }, "account_holder_type" : { "type" : "string", "deprecated" : false, "description" : "For Stripe ACH users only. Indicates the account holder type.\n\\* individual -\n\nIndividual Account.\n\\* company -\n\nCompany Account.\n", "enum" : [ "individual", "company" ], "example" : null }, "echeck_type" : { "type" : "string", "deprecated" : false, "description" : "For Authorize.net ACH users only. Indicates the type of eCheck.\n\\* ppd -\n\nPayment Authorization is prearranged between the customer and the merchant.\n\\* ccd -\n\nPayment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type.\n\\* web -\n\nPayment Authorization obtained from the customer via the internet.\n", "enum" : [ "web", "ppd", "ccd" ], "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "[two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html)\nISO country code. Required when local bank details are provided, and not IBAN.\n", "maxLength" : 50, "example" : null }, "swedish_identity_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 12, "minLength" : 10, "example" : null }, "billing_address" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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.

\n", "example" : null } }, "example" : null }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_method\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* go_pay -\n\nPayments made via GoPay\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* qpay -\n\nPayments made via Qpay.\n\\* pix -\n\nPayments made via Pix\n\\* pay_by_bank -\n\nPay By Bank\n\\* sofort -\n\nPayments made via Sofort.\n\\* twint -\n\nPayments made via Twint\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* giropay -\n\nPayments made via giropay.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* paypay -\n\nPayments made via PayPay\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* upi -\n\nUPI Payments.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* tamara -\n\nPayments made via Tamara.\n\\* payme -\n\nPayments made via PayMe\n\\* pay_to -\n\nPayments made via PayTo\n\\* pay_co -\n\nPayments made via PayCo\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* klarna -\n\nPayments made via Klarna.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* swish -\n\nPayments made via Swish\n\\* venmo -\n\nPayments made via Venmo\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* dana -\n\nPayments made via Dana.\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* gcash -\n\nPayments made via GCash.\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* trustly -\n\nTrustly\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor 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:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 65000, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "

ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

If you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, then XI\n(the code for United Kingdom - Northern Ireland\n) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier for the payment_intent resource. If you provide this parameter, you do not need to pass other payment_intent parameters.

", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "

The payment method type.

\n

Default value

\n* card -

card

\n* twint -

Payments made via Twint

\n\n* dotpay -

dotpay

\n* faster_payments -

Faster Payments

\n\n* upi -

upi

\n* kbc_payment_button -

KBC Payment Button

\n* klarna -

Payments made via Klarna.

\n\n* payme -

Payments made via PayMe

\n\n* google_pay -

google_pay

\n* paypal_express_checkout -

paypal_express_checkout

\n* pix -

Pix

\n\n* klarna_pay_now -

Klarna Pay Now

\n\n* ideal -

ideal

\n* boleto -

boleto

\n* wechat_pay -

Payments made via WeChat Pay.

\n\n* after_pay -

Payments made via Afterpay

\n\n* grab_pay -

Payments made via GrabPay

\n\n* direct_debit -

direct_debit

\n* sepa_instant_transfer -

Sepa Instant Transfer

\n\n* bancontact -

bancontact

\n* touch_n_go -

Payments made via Touch 'n Go.

\n\n* qpay -

Payments made via Qpay.

\n\n* kakao_pay -

Payments made via Kakao Pay.

\n\n* dana -

Payments made via Dana.

\n\n* south_korean_cards -

Payments made via South Korean Cards

\n* swish -

Payments made via Swish

\n\n* go_pay -

Payments made via GoPay

\n\n* trustly -

Trustly

\n* naver_pay -

Payments made via Naver Pay.

\n\n* stablecoin -

Payments made via Stablecoin.

\n\n* venmo -

Venmo

\n\n* alipay -

Payments made via Alipay.

\n\n* tamara -

Payments made via Tamara.

\n\n* pay_to -

PayTo

\n\n* pay_co -

Payments made via PayCo

\n\n* cash_app_pay -

Payments made via Cash App Pay.

\n\n* alipay_hk -

Payments made via Alipay HK.

\n\n* netbanking_emandates -

netbanking_emandates

\n* paypay -

PayPay

\n* payconiq_by_bancontact -

Payments made via Payconiq by Bancontact.

\n\n* electronic_payment_standard -

Electronic Payment Standard

\n* pay_by_bank -

Pay By Bank

\n* apple_pay -

apple_pay

\n* online_banking_poland -

Online Banking Poland

\n\n* gcash -

Payments made via GCash.

\n\n* giropay -

giropay

\n* sofort -

sofort

\n* amazon_payments -

Amazon Payments

\n* revolut_pay -

Payments made via Revolut Pay.

\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "entity_identifiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for entity_identifiers\n", "properties" : { "id" : { "type" : "array", "description" : "

The unique id for the entity_identifier\nin Chargebee. When not provided, it is autogenerated.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "scheme" : { "type" : "array", "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value of the entity_identifier.\nThis identifies the customer entity on the Peppol network. For example: 10101010-STO-10\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "standard" : { "type" : "array", "description" : "

The standard used for specifying the entity_identifier\nscheme.\nCurrently, only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If 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[].

", "items" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Add a contact to a customer resource.

\n

Prerequisites & Constraints

\n

Impacts

Email notifications

    \n
  • If you set contact[send_billing_email] to true, the contact receives billing emails.
  • \n
  • If you set contact[send_account_email] to true, the contact receives account emails.
  • \n
\n

Implementation Notes

Check the customer's contacts[] array and ensure it contains fewer than 10 contacts before calling this API.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "contact" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contact\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for the contact.\n", "maxLength" : 150, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the contact.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the contact.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "Label/Tag provided for contact.\n", "maxLength" : 50, "example" : null }, "enabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Contact enabled / disabled\n", "example" : null }, "send_billing_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Billing Emails option is enabled for the contact.\n", "example" : null }, "send_account_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Account Emails option is enabled for the contact.\n", "example" : null } }, "required" : [ "email" ], "example" : null } }, "example" : null }, "encoding" : { "contact" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "contact" : { "$ref" : "#/components/schemas/Contact", "description" : "Resource object representing contact" } }, "required" : [ "contact" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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/getting-started) 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "from_customer_id" : { "type" : "string", "deprecated" : false, "description" : "From customer id.\n", "maxLength" : 50, "example" : null }, "to_customer_id" : { "type" : "string", "deprecated" : false, "description" : "To customer id.\n", "maxLength" : 50, "example" : null } }, "required" : [ "from_customer_id", "to_customer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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:**\nThis operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/getting-started)\nand pass it as input parameter to this API.\n\nThis 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.\n", "operationId" : "collect_payment_for_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount to be collected. If this parameter is not passed then the invoice(s) amount to collect will be collected.\n", "minimum" : 0, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source used for the payment.\n", "maxLength" : 40, "example" : null }, "token_id" : { "type" : "string", "deprecated" : false, "description" : "Token generated by Chargebee JS representing payment method details.\n", "maxLength" : 40, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "retain_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the payment source should be retained for the customer.\n", "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\\* customer -\n\nPass this value to indicate that the request is initiated by the customer\n\\* merchant -\n\nPass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_method\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* go_pay -\n\nPayments made via GoPay\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* klarna -\n\nPayments made via Klarna.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* qpay -\n\nPayments made via Qpay.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* pix -\n\nPayments made via Pix\n\\* pay_by_bank -\n\nPay By Bank\n\\* sofort -\n\nPayments made via Sofort.\n\\* twint -\n\nPayments made via Twint\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* swish -\n\nPayments made via Swish\n\\* venmo -\n\nPayments made via Venmo\n\\* giropay -\n\nPayments made via giropay.\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* paypay -\n\nPayments made via PayPay\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* dana -\n\nPayments made via Dana.\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* upi -\n\nUPI Payments.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* gcash -\n\nPayments made via GCash.\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* tamara -\n\nPayments made via Tamara.\n\\* payme -\n\nPayments made via PayMe\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* pay_to -\n\nPayments made via PayTo\n\\* pay_co -\n\nPayments made via PayCo\n\\* trustly -\n\nTrustly\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor 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:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card scheme.\n\\* mastercard -\n\nA MasterCard scheme.\n\\* visa -\n\nA Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if billing_state_code\nis provided.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "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.\n\\* card -\n\ncard\n\\* twint -\n\nPayments made via Twint\n\\* swish -\n\nPayments made via Swish\n\\* dotpay -\n\ndotpay\n\\* faster_payments -\n\nFaster Payments\n\\* upi -\n\nupi\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* klarna -\n\nPayments made via Klarna.\n\\* payme -\n\nPayments made via PayMe\n\\* go_pay -\n\nPayments made via GoPay\n\\* google_pay -\n\ngoogle_pay\n\\* trustly -\n\nTrustly\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* pix -\n\nPix\n\\* venmo -\n\nVenmo\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* alipay -\n\nPayments made via Alipay.\n\\* tamara -\n\nPayments made via Tamara.\n\\* ideal -\n\nideal\n\\* pay_to -\n\nPayTo\n\\* boleto -\n\nboleto\n\\* pay_co -\n\nPayments made via PayCo\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* paypay -\n\nPayPay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* direct_debit -\n\ndirect_debit\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* bancontact -\n\nbancontact\n\\* pay_by_bank -\n\nPay By Bank\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* apple_pay -\n\napple_pay\n\\* qpay -\n\nPayments made via Qpay.\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* gcash -\n\nPayments made via GCash.\n\\* giropay -\n\ngiropay\n\\* sofort -\n\nsofort\n\\* amazon_payments -\n\nAmazon Payments\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* dana -\n\nPayments made via Dana.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "invoice_allocations" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice_allocations\n", "properties" : { "invoice_id" : { "type" : "array", "description" : "Identifier for the invoice. Multiple invoices can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "required" : [ "invoice_id" ], "example" : null } }, "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "customer", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Records an offline payment for a customer and adds it to the customer's excess payments balance.

\n

Impacts

Invoices

\n

Related APIs

Apply payments for an invoice

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the payment.\n", "maxLength" : 300, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the transaction. \n**Constraints**\n\n* The value must be unique within the site; it should not collide with any existing transaction ID.\n", "maxLength" : 40, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The payment transaction amount.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the transaction.\n", "maxLength" : 3, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction\n\\* cash -\n\nCash\n\\* other -\n\nPayment Methods other than the above types\n\\* custom -\n\nCustom payment method. \n**Prerequisite**\n\n* [Custom payment methods](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/custom-payment-methods&ref=feature) must be enabled in Chargebee Billing.\n\\* check -\n\nCheck\n\\* bank_transfer -\n\nBank Transfer\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. e.g check number in case of 'check' payments.\n", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the custom payment method of this transaction.

\n

Prerequisite

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "date", "payment_method" ], "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "customer", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "contact" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contact\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for the contact.\n", "maxLength" : 150, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the contact.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the contact.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "Label/Tag provided for contact.\n", "maxLength" : 50, "example" : null }, "enabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Contact enabled / disabled\n", "example" : null }, "send_billing_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Billing Emails option is enabled for the contact.\n", "example" : null }, "send_account_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Account Emails option is enabled for the contact.\n", "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "contact" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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, this operation updates the access privileges that both the customer and its parent have to the customer's data.

Terminology\nThe term "parent" usually refers to the customer with the ID 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.

Tip\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 and then call Link a customer with the updated values.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "use_default_hierarchy_settings" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "

Decides if Chargebee should apply settings from the Chargebee Billing UI or from this API request.

\n", "example" : null }, "parent_account_access" : { "type" : "object", "deprecated" : false, "description" : "Parameters for parent_account_access\n", "properties" : { "portal_edit_child_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Sets parent's level of access to child subscriptions on the Self-Serve Portal.\n\\* yes -\n\nThe parent account can view and edit the subscriptions of the child account.\n\\* no -\n\nThe parent account cannot view or edit the subscriptions of the child account.\n\\* view_only -\n\nThe parent account can only view the subscriptions of the child account.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "portal_download_child_invoices" : { "type" : "string", "deprecated" : false, "description" : "Sets parent's level of access to child invoices on the Self-Serve Portal.\n\\* yes -\n\nThe parent account can view and download the invoices of the child account.\n\\* no -\n\nThe parent account can neither view nor download the invoices of the child account.\n\\* view_only -\n\nThe parent account can only view the invoices of the child account.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, the parent account will receive subscription-related emails sent to the child account.

", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, the parent account will receive payment-related emails sent to the child account.

", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, the parent account will receive invoice-related emails sent to the child account.

", "example" : null } }, "example" : null }, "child_account_access" : { "type" : "object", "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.\n", "properties" : { "portal_edit_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own subscriptions in the Self-Serve Portal.\n\\* view_only -\n\nThe child account can only view its subscriptions.\n\\* yes -\n\nThe child account can view and edit its subscriptions.\n", "enum" : [ "yes", "view_only" ], "example" : null }, "portal_download_invoices" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own invoices in the Self-Serve Portal.\n\\* view_only -\n\nThe child account can view but not download its invoices.\n\\* no -\n\nThe child account cannot view or download its own invoices.\n\\* yes -\n\nThe child account can both view and download its invoices.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, the child account receives email notifications for its subscriptions.

", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, the child account receives email notifications for payment-related activities for its invoices.

", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, the child account receives email notifications for its invoices.

", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "child_account_access" : { "style" : "deepObject", "explode" : true }, "parent_account_access" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Updates a customer's billing information, including billing address and tax-related details such as VAT number.

Note

See Related APIs for other customer attributes that can be updated.

\n

Prerequisites & Constraints

In some cases, passing the following parameters can cause the request to fail: vat_number, business_customer_without_vat_number, tax_providers_fields, and registered_for_gst. See Implementation Notes for more details.

\n

Impacts

Customer

For certain parameters, if you do not include a parameter in the request, Chargebee removes the corresponding attribute from the customer object. To retain an existing attribute, you must explicitly include its parameter in your request.

Parameters that are affected by this behavior
    \n
  • billing_address.first_name
  • \n
  • billing_address.last_name
  • \n
  • billing_address.phone
  • \n
  • billing_address.email
  • \n
  • billing_address.line1
  • \n
  • billing_address.line2
  • \n
  • billing_address.line3
  • \n
  • billing_address.city
  • \n
  • billing_address.state
  • \n
  • billing_address.country
  • \n
  • billing_address.zip
  • \n
  • vat_number
  • \n
  • vat_number_prefix
  • \n
  • business_customer_without_vat_number
  • \n
  • registered_for_gst
  • \n
Example

Assume the customer object has these attributes set:

Current attributes:

    \n
  • billing_address.first_name
  • \n
  • billing_address.last_name
  • \n
  • billing_address.phone
  • \n
  • billing_address.email
  • \n
  • vat_number
  • \n

You make an API call with only the following parameters:

Request parameters:

    \n
  • billing_address.first_name
  • \n
  • billing_address.last_name
  • \n
  • billing_address.phone
  • \n

Result: The billing_address.email and vat_number attributes are removed from the customer object because they weren't included in the request. To preserve these attributes, include them in the request.

Invoices

    \n
  • Chargebee uses the billing_address object from the customer to set the values in the billing_address of the invoices generated for the customer.
  • \n
  • If the billing_address object does not include the first_name, last_name, or company fields, Chargebee automatically uses the values from customer.first_name, customer.last_name, and customer.company (if available) when generating invoices.
  • \n
\n

Implementation Notes

\n

Use Cases

Prevent tax provider errors due to missing billing information

After integrating tax providers, you might encounter unintended tax calculation failures during renewals. The error message typically states:

\n

Unable to calculate the tax rate as the shipping/billing address is either invalid or incomplete. Please verify and try again.

\n

This error can occur even if the is_taxable value of item prices is changed from true to false before subscription renewal and reactivation.

Solution

Use this operation to update the billing address attributes to ensure they are accurate and complete.

\n

Troubleshooting

Here are some commonly encountered errors when using this API, along with their resolutions

Error: 400: "Operation failed as the country entered in the billing address by the customer cannot be verified against IP address or card BIN number."

This error occurs when location validation is enabled in the tax settings and there's a mismatch between the customer's billing country and their IP address or the card issuing country.

Resolution

Choose one of the following solutions:

Option A: Fix IP address mismatch

Use the Update a card payment source API and include the correct IP address in the request header.

Option B: Fix BIN mismatch

Ask the customer to update their payment method with one whose BIN matches their country. You can do this using the Request Payment Method option or the Self-Serve Portal.

Option C: Disable location validation

    \n
  1. In Chargebee Billing, navigate to Settings > Configure Chargebee > Taxes.
  2. \n
  3. Select the country.
  4. \n
  5. In the right pane, clear the Enable location validation checkbox.
  6. \n
\n

Related APIs

Update a customer

Link a customer to an account

Unlink a customer from its parent account

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "

The VAT/tax registration number for the customer.\nFor customers with billing_address as XI (United Kingdom - Northern Ireland), the first two characters of the full VAT number can be overridden by setting vat_number_prefix.

\n

Warning

", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address as XI (United Kingdom - Northern Ireland).

\n

Warning\nIf you don't pass this parameter, the value will be deleted from the customer object.

", "maxLength" : 10, "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "

The standard used for specifying the entity_identifier_scheme.\nCurrently only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true then the Reverse Charge Mechanism is applicable. This field is applicable only when Australian GST is configured for your site.

\n

Warning

", "example" : null }, "business_customer_without_vat_number" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is a valid business without an EU/UK VAT number.

\n

Warning

", "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the customer is e-invoiced. When set to true\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (billing_address.country\n). When set to false\n, the customer is not e-invoiced even if e-invoicing is enabled for their country.

\n

Tip:

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", "example" : null }, "einvoicing_method" : { "type" : "string", "deprecated" : false, "description" : "Determines whether to send einvoice manually or automatic.\n\\* automatic -\n\nUse this value to send e-invoice every time an invoice or credit note is created.\n\\* manual -\n\nWhen manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API.\n\\* site_default -\n\nThe default value of the site which can be overridden at the customer level.\n", "enum" : [ "automatic", "manual", "site_default" ], "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact. \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact. \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address. \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number. \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1. \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2. \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3. \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city. \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada, India and UAE.\nFor example:

\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name.

\n

Warning\nIf you don't pass this parameter, the value will be deleted from the customer object.

\n

Note\nIf you don't pass this parameter, the value will be set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). \n**Warning**\nIf you don't pass this parameter, the value will be **deleted** from the customer object.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

\n

Warning\nIf you don't pass this parameter, the value will be deleted from the customer object.

\n

Brexit\nIf you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

\n

E-Invoicing\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", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* invalid -\n\nAddress is invalid.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "entity_identifiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for entity_identifiers.\n", "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.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "scheme" : { "type" : "array", "description" : "

The Peppol BIS scheme associated with the 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.

\n

Tip\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 entity_identifiers[] description.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value of the entity_identifier.\nThis identifies the customer entity on the Peppol network. For example: 10101010-STO-10\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "operation" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be performed for the entity_identifier.

\n\n* update -

Updates an existing entity_identifier for the customer. entity_identifier[id] must be provided in this case.

\n* delete -

Deletes an existing entity_identifier for the customer. entity_identifier[id] must be provided in this case.

\n* create -

Creates a new entity_identifier for the customer.

", "enum" : [ "create", "update", "delete" ], "example" : null }, "example" : null }, "standard" : { "type" : "array", "description" : "

The standard used for specifying the entity_identifier\nscheme.\nCurrently, only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If 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[].

", "items" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields. \\*\\*Note\\*\\* This parameter is supported only when selling to \\[India-SEZ\\](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-special-economic-zones-sezs) customers or when you're an \\[Indian business that sells to customers outside India\\](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-exports).\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider. \n**Note**\nThis parameter is supported only when selling to [India-SEZ](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-special-economic-zones-sezs) customers or when you're an [Indian business that sells to customers outside India](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-exports).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee. \n**Note**\nThis parameter is supported only when selling to [India-SEZ](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-special-economic-zones-sezs) customers or when you're an [Indian business that sells to customers outside India](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-exports).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field. \n**Note**\nThis parameter is supported only when selling to [India-SEZ](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-special-economic-zones-sezs) customers or when you're an [Indian business that sells to customers outside India](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-exports).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "entity_identifiers" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which the token is associated.\n", "maxLength" : 50, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "Type of payment method of the token.\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* pay_co -\n\nPayments made via PayCo\n\\* tamara -\n\nPayments made via Tamara.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* trustly -\n\nTrustly\n\\* after_pay -\n\nPayments made via Afterpay\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* giropay -\n\nPayments made via giropay.\n\\* sofort -\n\nPayments made via Sofort.\n\\* gcash -\n\nPayments made via GCash.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* dana -\n\nPayments made via Dana.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* qpay -\n\nPayments made via Qpay.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* upi -\n\nUPI Payments.\n\\* pay_by_bank -\n\nPay By Bank\n\\* go_pay -\n\nPayments made via GoPay\n\\* swish -\n\nPayments made via Swish\n\\* twint -\n\nPayments made via Twint\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* payme -\n\nPayments made via PayMe\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* kbc_payment_button -\n\nKBC Payment Button\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "id_at_vault" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 65000, "example" : null }, "gw_obj_type" : { "type" : "string", "deprecated" : false, "description" : "Represents what type of object at gateway eg. \"token\" in case Stripe token and \"source\" in case of Stripe Source.\n", "maxLength" : 255, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "Used to derieve Bank Account Scheme by default will take site default currency.\n", "maxLength" : 3, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null }, "browser_details" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "token_additional_detail" : { "type" : "object", "deprecated" : false, "description" : "Parameters for token_additional_detail\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null } }, "example" : null }, "token_billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for token_billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "country_code" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null } }, "example" : null } }, "required" : [ "id_at_vault", "payment_method_type" ], "example" : null }, "encoding" : { "token_additional_detail" : { "style" : "deepObject", "explode" : true }, "token_billing_address" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token", "description" : "

Resource object representing token

" } }, "required" : [ "token" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "browser_details" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card scheme.\n\\* mastercard -\n\nA MasterCard scheme.\n\\* mada -\n\nA Mada card scheme.\n\\* visa -\n\nA Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if billing_state_code\nis provided.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null }, "card_type" : { "type" : "string", "deprecated" : false, "description" : "Type of the card\n\\* not_applicable -\n\nUsed for offline entries in transactions. Not applicable for cards\n\\* visa -\n\nA Visa card.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* jcb -\n\nA JCB card.\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* diners_club -\n\nA Diner's Club card.\n\\* other -\n\nCard belonging to types other than those listed above.\n\\* discover -\n\nA Discover card.\n\\* american_express -\n\nAn American Express card.\n\\* bancontact -\n\nA Bancontact card.\n\\* pay_by_bank -\n\nPay By Bank\n\\* mastercard -\n\nA MasterCard.\n\\* trustly -\n\nTrustly\n", "enum" : [ "visa", "mastercard", "american_express", "discover", "jcb", "diners_club", "bancontact", "cmr_falabella", "tarjeta_naranja", "nativa", "cencosud", "cabal", "argencard", "elo", "hipercard", "carnet", "rupay", "maestro", "dankort", "cartes_bancaires", "mada", "other", "not_applicable" ], "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address of the cardholder. Required by some gateways when creating a card token.\n", "maxLength" : 70, "example" : null } }, "required" : [ "expiry_month", "expiry_year", "number" ], "example" : null } }, "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token", "description" : "

Resource object representing token

" } }, "required" : [ "token" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cb-token-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cb-token-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token", "description" : "

Resource object representing token

" } }, "required" : [ "token" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Creates a payment source for a customer using a permanent token obtained from the payment gateway.

Use this API to add a payment method that has already been vaulted in your gateway account. The permanent token enables Chargebee to securely link the payment method to the customer. This enables payment collection for future charges (both recurring and one-time) without requiring the customer to re-enter their payment details.

\n

Prerequisites & Constraints

\n

Impacts

Customer

Pass the replace_primary_payment_source parameter as true to update the customer's primary_payment_source_id. Otherwise, the existing primary payment source will remain unchanged.

", "operationId" : "create_using_permanent_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* pay_to -\n\nPayments made via PayTo\n\\* klarna -\n\nPayments made via Klarna.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* giropay -\n\nPayments made via giropay.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* sofort -\n\nPayments made via Sofort.\n\\* gcash -\n\nPayments made via GCash.\n\\* dana -\n\nPayments made via Dana.\n\\* pix -\n\nPayments made via Pix\n\\* pay_co -\n\nPayments made via PayCo\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* go_pay -\n\nPayments made via GoPay\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* pay_by_bank -\n\nPay By Bank\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* paypay -\n\nPayments made via PayPay\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* payme -\n\nPayments made via PayMe\n\\* tamara -\n\nPayments made via Tamara.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* twint -\n\nPayments made via Twint\n\\* swish -\n\nPayments made via Swish\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* venmo -\n\nPayments made via Venmo\n\\* ideal -\n\nPayments made via iDEAL.\n\\* trustly -\n\nTrustly\n\\* upi -\n\nUPI Payments.\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* qpay -\n\nPayments made via Qpay.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which the payment source is associated.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "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:

", "maxLength" : 200, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "payment_method_token" : { "type" : "string", "deprecated" : false, "description" : "

An identifier provided by the gateway or card vault for the specific payment method resource.

\n

Note:\npayment_method_token is an alternative for reference_id and cannot be used with reference_id.

", "maxLength" : 100, "example" : null }, "customer_profile_token" : { "type" : "string", "deprecated" : false, "description" : "

A unique identifier associated with a customer`s profile within a payment gateway.

\n

Note:\ncustomer_profile_token is an alternative for reference_id and cannot be used with reference_id.

", "maxLength" : 100, "example" : null }, "network_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "

An identifier of the payment or authorization transaction at the gateway initiated using this payment method.

\n

Note:\nnetwork_transaction_id is an alternative for reference_id and cannot be used with reference_id.

", "maxLength" : 100, "example" : null }, "mandate_id" : { "type" : "string", "deprecated" : false, "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:\nmandate_id is an alternative for reference_id and cannot be used with reference_id.

", "maxLength" : 100, "example" : null }, "skip_retrieval" : { "type" : "boolean", "default" : false, "deprecated" : false, "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.\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:\nCurrently, the skip_retrieval value as true is only supported for the Vantiv payment gateway.

", "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters of tokenized card details\n", "properties" : { "last4" : { "type" : "string", "deprecated" : false, "description" : "Last four digits of the card number\n", "maxLength" : 4, "minLength" : 4, "example" : null }, "iin" : { "type" : "string", "deprecated" : false, "description" : "The Issuer Identification Number, i.e. the first six digits of the card number\n", "maxLength" : 6, "minLength" : 6, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "brand" : { "type" : "string", "deprecated" : false, "description" : "Card brand\n\\* cabal -\n\nA Cabal card.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card.\n\\* american_express -\n\nAn American Express card.\n\\* visa -\n\nA Visa card.\n\\* cencosud -\n\nA Cencosud card.\n\\* maestro -\n\nA Maestro card.\n\\* carnet -\n\nA Carnet card.\n\\* argencard -\n\nAn Argencard.\n\\* dankort -\n\nA Dankort card.\n\\* tarjeta_naranja -\n\nA Tarjeta Naranja card.\n\\* mastercard -\n\nA MasterCard.\n\\* jcb -\n\nA JCB card.\n\\* hipercard -\n\nAn Hipercard.\n\\* other -\n\nCard belonging to types other than those listed above.\n\\* bancontact -\n\nA Bancontact card.\n\\* cmr_falabella -\n\nA CMR Falabella card.\n\\* rupay -\n\nA Rupay card.\n\\* nativa -\n\nA Nativa card.\n\\* discover -\n\nA Discover card.\n\\* elo -\n\nA Elo card.\n\\* diners_club -\n\nA Diner's Club card.\n\\* mada -\n\nA Mada card.\n", "enum" : [ "visa", "mastercard", "american_express", "discover", "jcb", "diners_club", "other", "bancontact", "cmr_falabella", "tarjeta_naranja", "nativa", "cencosud", "cabal", "argencard", "elo", "hipercard", "carnet", "rupay", "maestro", "dankort", "cartes_bancaires", "mada" ], "example" : null }, "funding_type" : { "type" : "string", "deprecated" : false, "description" : "Card Funding type\n\\* not_known -\n\nAn unknown card.\n\\* debit -\n\nA debit card.\n\\* credit -\n\nA credit card.\n\\* prepaid -\n\nA prepaid card.\n", "enum" : [ "credit", "debit", "prepaid", "not_known" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null } }, "example" : null } }, "required" : [ "customer_id", "type" ], "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "card" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\n **Note** : *When multiple payment sources exist, the payment method added most recently will be considered*.\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\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\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**\n:\n\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.\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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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)\nunder Payment source to store the card after successful 3DS flow completion.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\\* mastercard -\n\nA MasterCard scheme.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card scheme.\n\\* visa -\n\nA Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if billing_state_code\nis provided.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "required" : [ "expiry_month", "expiry_year", "number" ], "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/gateway_payment_method_tokens" : { "get" : { "summary" : "List Gateway Payment Method Tokens For A Payment Source", "description" : "Lists gateway payment method token mappings stored for this payment source. A payment source can have multiple gateway tokens when vaulting and backup gateway merchant-initiated transactions (MIT) are enabled.\n", "operationId" : "list_gateway_payment_method_tokens_for_a_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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 '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\*true\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\* '.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "gateway_payment_method_token" : { "$ref" : "#/components/schemas/GatewayPaymentMethodToken", "description" : "Resource object representing gateway_payment_method_token" } }, "required" : [ "gateway_payment_method_token" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nFor 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\". \nA maximum of 10 failed verification attempts are allowed. Once this limit has been crossed, the bank account can no longer be verified, and will be marked as \"Invalid\" in Chargebee.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount1" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Value of the micro-deposits sent to the bank account.\n", "minimum" : 0, "example" : null }, "amount2" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Value of the micro-deposits sent to the bank account.\n", "minimum" : 0, "example" : null } }, "required" : [ "amount1", "amount2" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "operationId" : "list_payment_sources", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "subscription_id", "in" : "query", "description" : "

Unique subscription identifier that helps to retrieve the payment source of a subscription which has mandate\nassociated to it.

", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "

Indicates whether to include deleted objects in the list. The deleted objects have the attribute 'deleted\n' as 'true\n'.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on Customer Id.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"3bdjnDnsdQn\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nType of payment source. Possible values are : card, paypal_express_checkout, amazon_payments, direct_debit, generic, alipay, alipay_hk, gcash, dana, touch_n_go, tamara, qpay, unionpay, apple_pay, wechat_pay, ideal, google_pay, sofort, bancontact, giropay, dotpay, upi, netbanking_emandates.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is\\] = \"card\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "card", "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 \\* \\`online_banking_poland\\` - Payments made via Online Banking Poland \\* \\`payconiq_by_bancontact\\` - Payments made via Payconiq by Bancontact \\* \\`electronic_payment_standard\\` - Payments made via Electronic Payment Standard. \\* \\`kbc_payment_button\\` - Payments made via KBC Payment Button. \\* \\`pay_by_bank\\` - Payments made via Pay By Bank. \\* \\`trustly\\` - Payments made via Trustly. \\* \\`stablecoin\\` - Payments made via Stablecoin \\* \\`kakao_pay\\` - Payments made via Kakao Pay \\* \\`naver_pay\\` - Payments made via Naver Pay \\* \\`revolut_pay\\` - Payments made via Revolut Pay \\* \\`cash_app_pay\\` - Payments made via Cash App Pay \\* \\`twint\\` - Payments made via Twint \\* \\`go_pay\\` - Payments made via Go Pay \\* \\`grab_pay\\` - Payments made via Grab Pay \\* \\`pay_co\\` - Payments made via Pay Co \\* \\`after_pay\\` - Payments made via After pay \\* \\`swish\\` - Payments made via Swish \\* \\`payme\\` - Payments made via PayMe \\* \\`pix\\` - Payments made via Pix \\* \\`klarna\\` - Payments made via Klarna \\* \\`alipay_hk\\` - Payments made via Alipay HK \\* \\`paypay\\` - Payments made via PayPay \\* \\`gcash\\` - Payments made via GCash \\* \\`south_korean_cards\\` - Payments made via South Korean Cards \\* \\`paynow\\` - Payments made via PayNow \\* \\`bizum\\` - Payments made via Bizum \\* \\`promptpay\\` - Payments made via PromptPay \\* \\`dana\\` - Payments made via Dana \\* \\`touch_n_go\\` - Payments made via Touch 'n Go \\* \\`tamara\\` - Payments made via Tamara \\* \\`qpay\\` - Payments made via Qpay\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "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 \\* \\`online_banking_poland\\` - Payments made via Online Banking Poland \\* \\`payconiq_by_bancontact\\` - Payments made via Payconiq by Bancontact \\* \\`electronic_payment_standard\\` - Payments made via Electronic Payment Standard. \\* \\`kbc_payment_button\\` - Payments made via KBC Payment Button. \\* \\`pay_by_bank\\` - Payments made via Pay By Bank. \\* \\`trustly\\` - Payments made via Trustly. \\* \\`stablecoin\\` - Payments made via Stablecoin \\* \\`kakao_pay\\` - Payments made via Kakao Pay \\* \\`naver_pay\\` - Payments made via Naver Pay \\* \\`revolut_pay\\` - Payments made via Revolut Pay \\* \\`cash_app_pay\\` - Payments made via Cash App Pay \\* \\`twint\\` - Payments made via Twint \\* \\`go_pay\\` - Payments made via Go Pay \\* \\`grab_pay\\` - Payments made via Grab Pay \\* \\`pay_co\\` - Payments made via Pay Co \\* \\`after_pay\\` - Payments made via After pay \\* \\`swish\\` - Payments made via Swish \\* \\`payme\\` - Payments made via PayMe \\* \\`pix\\` - Payments made via Pix \\* \\`klarna\\` - Payments made via Klarna \\* \\`alipay_hk\\` - Payments made via Alipay HK \\* \\`paypay\\` - Payments made via PayPay \\* \\`gcash\\` - Payments made via GCash \\* \\`south_korean_cards\\` - Payments made via South Korean Cards \\* \\`paynow\\` - Payments made via PayNow \\* \\`bizum\\` - Payments made via Bizum \\* \\`promptpay\\` - Payments made via PromptPay \\* \\`dana\\` - Payments made via Dana \\* \\`touch_n_go\\` - Payments made via Touch 'n Go \\* \\`tamara\\` - Payments made via Tamara \\* \\`qpay\\` - Payments made via Qpay\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "in" : { "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 \\* \\`online_banking_poland\\` - Payments made via Online Banking Poland \\* \\`payconiq_by_bancontact\\` - Payments made via Payconiq by Bancontact \\* \\`electronic_payment_standard\\` - Payments made via Electronic Payment Standard. \\* \\`kbc_payment_button\\` - Payments made via KBC Payment Button. \\* \\`pay_by_bank\\` - Payments made via Pay By Bank. \\* \\`trustly\\` - Payments made via Trustly. \\* \\`stablecoin\\` - Payments made via Stablecoin \\* \\`kakao_pay\\` - Payments made via Kakao Pay \\* \\`naver_pay\\` - Payments made via Naver Pay \\* \\`revolut_pay\\` - Payments made via Revolut Pay \\* \\`cash_app_pay\\` - Payments made via Cash App Pay \\* \\`twint\\` - Payments made via Twint \\* \\`go_pay\\` - Payments made via Go Pay \\* \\`grab_pay\\` - Payments made via Grab Pay \\* \\`pay_co\\` - Payments made via Pay Co \\* \\`after_pay\\` - Payments made via After pay \\* \\`swish\\` - Payments made via Swish \\* \\`payme\\` - Payments made via PayMe \\* \\`pix\\` - Payments made via Pix \\* \\`klarna\\` - Payments made via Klarna \\* \\`alipay_hk\\` - Payments made via Alipay HK \\* \\`paypay\\` - Payments made via PayPay \\* \\`gcash\\` - Payments made via GCash \\* \\`south_korean_cards\\` - Payments made via South Korean Cards \\* \\`paynow\\` - Payments made via PayNow \\* \\`bizum\\` - Payments made via Bizum \\* \\`promptpay\\` - Payments made via PromptPay \\* \\`dana\\` - Payments made via Dana \\* \\`touch_n_go\\` - Payments made via Touch 'n Go \\* \\`tamara\\` - Payments made via Tamara \\* \\`qpay\\` - Payments made via Qpay\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|pix|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|pix|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null }, "not_in" : { "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 \\* \\`online_banking_poland\\` - Payments made via Online Banking Poland \\* \\`payconiq_by_bancontact\\` - Payments made via Payconiq by Bancontact \\* \\`electronic_payment_standard\\` - Payments made via Electronic Payment Standard. \\* \\`kbc_payment_button\\` - Payments made via KBC Payment Button. \\* \\`pay_by_bank\\` - Payments made via Pay By Bank. \\* \\`trustly\\` - Payments made via Trustly. \\* \\`stablecoin\\` - Payments made via Stablecoin \\* \\`kakao_pay\\` - Payments made via Kakao Pay \\* \\`naver_pay\\` - Payments made via Naver Pay \\* \\`revolut_pay\\` - Payments made via Revolut Pay \\* \\`cash_app_pay\\` - Payments made via Cash App Pay \\* \\`twint\\` - Payments made via Twint \\* \\`go_pay\\` - Payments made via Go Pay \\* \\`grab_pay\\` - Payments made via Grab Pay \\* \\`pay_co\\` - Payments made via Pay Co \\* \\`after_pay\\` - Payments made via After pay \\* \\`swish\\` - Payments made via Swish \\* \\`payme\\` - Payments made via PayMe \\* \\`pix\\` - Payments made via Pix \\* \\`klarna\\` - Payments made via Klarna \\* \\`alipay_hk\\` - Payments made via Alipay HK \\* \\`paypay\\` - Payments made via PayPay \\* \\`gcash\\` - Payments made via GCash \\* \\`south_korean_cards\\` - Payments made via South Korean Cards \\* \\`paynow\\` - Payments made via PayNow \\* \\`bizum\\` - Payments made via Bizum \\* \\`promptpay\\` - Payments made via PromptPay \\* \\`dana\\` - Payments made via Dana \\* \\`touch_n_go\\` - Payments made via Touch 'n Go \\* \\`tamara\\` - Payments made via Tamara \\* \\`qpay\\` - Payments made via Qpay\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|pix|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|pix|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent status of the payment source. Possible values are : valid, expiring, expired, invalid, pending_verification.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"valid\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "valid", "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\n", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "example" : null }, "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\n", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "example" : null }, "in" : { "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\n", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "pattern" : "^\\[(valid|expiring|expired|invalid|pending_verification)(,(valid|expiring|expired|invalid|pending_verification))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "pattern" : "^\\[(valid|expiring|expired|invalid|pending_verification)(,(valid|expiring|expired|invalid|pending_verification))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this payment source resource was last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this payment source resource is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source" } }, "required" : [ "payment_source" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nThis is useful if you want to port your customer's card details into another gateway. \nThis operation does not support copying of cards from Stripe and Braintree gateways. If you need help using this API, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "operationId" : "export_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account you want to copy the card.\n", "maxLength" : 50, "example" : null } }, "required" : [ "gateway_account_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "third_party_payment_method" : { "$ref" : "#/components/schemas/ThirdPartyPaymentMethod", "description" : "

Resource object representing third_party_payment_method

" } }, "required" : [ "third_party_payment_method" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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)\non the 3DS implementation via Chargebee APIs.\n", "operationId" : "create_using_payment_intent", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "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.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* card -\n\ncard\n\\* twint -\n\nPayments made via Twint\n\\* swish -\n\nPayments made via Swish\n\\* after_pay -\n\nPayments made via Afterpay\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* paypay -\n\nPayPay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* dotpay -\n\ndotpay\n\\* faster_payments -\n\nFaster Payments\n\\* upi -\n\nupi\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* klarna -\n\nPayments made via Klarna.\n\\* payme -\n\nPayments made via PayMe\n\\* direct_debit -\n\ndirect_debit\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* bancontact -\n\nbancontact\n\\* go_pay -\n\nPayments made via GoPay\n\\* pay_by_bank -\n\nPay By Bank\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* google_pay -\n\ngoogle_pay\n\\* apple_pay -\n\napple_pay\n\\* qpay -\n\nPayments made via Qpay.\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* trustly -\n\nTrustly\n\\* gcash -\n\nPayments made via GCash.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* giropay -\n\ngiropay\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* pix -\n\nPix\n\\* venmo -\n\nVenmo\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* alipay -\n\nPayments made via Alipay.\n\\* sofort -\n\nsofort\n\\* amazon_payments -\n\nAmazon Payments\n\\* tamara -\n\nPayments made via Tamara.\n\\* ideal -\n\nideal\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* pay_to -\n\nPayTo\n\\* dana -\n\nPayments made via Dana.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* boleto -\n\nboleto\n\\* pay_co -\n\nPayments made via PayCo\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_info" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

Applicable only for Braintree gateway. Can be used only for Braintree's Premium Fraud Management Tools.\nPass a stringified JSON containing the device_session_id\nand fraud_merchant_id\nas an input to fingerprint.\nHere's a sample\nto it.

", "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "payment_intent" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "voucher_payment_source" : { "type" : "object", "deprecated" : false, "description" : "Parameters for voucher_payment_source\n", "properties" : { "voucher_type" : { "type" : "string", "deprecated" : false, "description" : "Voucher based payment methods\n\\* boleto -\n\nBoleto\n", "enum" : [ "boleto" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which the payment method is associated.\n", "maxLength" : 50, "example" : null }, "tax_id" : { "type" : "string", "deprecated" : false, "description" : "Customer Tax id\n", "maxLength" : 20, "example" : null }, "billing_address" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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.

\n", "example" : null } }, "required" : [ "voucher_type" ], "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "voucher_payment_source" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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)\nunder 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]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A-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which the payment source is associated.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Type of payment source.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* pay_to -\n\nPayments made via PayTo\n\\* klarna -\n\nPayments made via Klarna.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* paypay -\n\nPayments made via PayPay\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* payme -\n\nPayments made via PayMe\n\\* giropay -\n\nPayments made via giropay.\n\\* tamara -\n\nPayments made via Tamara.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* twint -\n\nPayments made via Twint\n\\* swish -\n\nPayments made via Swish\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* venmo -\n\nPayments made via Venmo\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* sofort -\n\nPayments made via Sofort.\n\\* gcash -\n\nPayments made via GCash.\n\\* dana -\n\nPayments made via Dana.\n\\* pix -\n\nPayments made via Pix\n\\* pay_co -\n\nPayments made via PayCo\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* trustly -\n\nTrustly\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* upi -\n\nUPI Payments.\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* go_pay -\n\nPayments made via GoPay\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* pay_by_bank -\n\nPay By Bank\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* qpay -\n\nPayments made via Qpay.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 65000, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "required" : [ "customer_id", "tmp_token", "type" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nIn **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**\n: This endpoint supports Chargebee Test Gateway, [Stripe](https://www.chargebee.com/docs/2.0/stripe.html)\n, [Braintree](https://www.chargebee.com/docs/2.0/braintree.html)\n, [Authorize.net](https://www.chargebee.com/docs/2.0/authorize-index.html)\n, [Worldpay US eCom](https://www.chargebee.com/docs/2.0/vantiv_worldpay.html)\n, and [WorldPay Direct Integration](https://www.chargebee.com/docs/2.0/worldpay-direct.html)\n. 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)\nto 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)\nparameter. 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)\nobject.\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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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.\n", "example" : null }, "reference_transaction" : { "type" : "string", "deprecated" : false, "description" : "Reference transaction is used for future purchases. This is only applicable for Vantiv.\n", "maxLength" : 50, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Moves a card payment source from one gateway account to another.

Use this operation to migrate payment methods between gateway accounts, such as when:

Supported gateways

See the Use Cases section for the list of supported source-destination gateway combinations.

Impact on reference_id

This operation updates the reference_id attribute of the payment source. In case you are using this value for any downstream system integrations, you will need to update the reference_id for the payment source in the downstream system to the new value.

\n

Prerequisites & Constraints

\n

Impacts

Payment source
\n

Use Cases

Supported source-destination gateway combinations

The API supports only the following source-destination gateway combinations:

", "operationId" : "switch_gateway_account", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account you want to switch to.\n", "maxLength" : 50, "example" : null } }, "required" : [ "gateway_account_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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)\nunder Payment source to store the card after successful 3DS flow completion.\n", "operationId" : "create_using_chargebee_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "token_id" : { "type" : "string", "deprecated" : false, "description" : "Token generated by Chargebee JS representing payment method details.\n", "maxLength" : 40, "example" : null } }, "required" : [ "customer_id", "token_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Delete a payment source reference from a Chargebee customer without deleting or altering payment source data stored at the payment gateway.

\n\n\n

Impacts

Payment Source

Sets deleted = true on the specified payment_source and detaches it from the customer. The payment source is no longer accessible through the API or the UI.

Customer

If the deleted payment_source is the customer's only payment method and auto_collection is on, automatic payment collection for future invoices fails.

If the deleted payment source was the primary payment method for the customer, and a backup exists, Chargebee promotes the backup to primary.

If no backup is set but other payment_source objects exist for the customer, Chargebee promotes one of them to primary.

Subscription

When you delete a payment source linked to an active subscription, Chargebee immediately clears the payment_source_id on that subscription. Future charges use the customer's primary_payment_source_id.

\n

Related APIs

Delete a payment source

List payment sources

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Automated Clearing House (ACH) Network

ACH is an electronic network for passing financial transactions in the US. Chargebee currently supports ACH via Stripe , Authorize.Net, and GoCardless.

Note:

Bank account verification

Once the bank account has been added, it needs to be verified.

Single Euro Payment Area (SEPA)

SEPA is an initiative that integrates bank transfer payments denominated in euro. It is supported via GoCardless, Stripe and Adyen.

Note:

Bacs Payment Schemes Limited (BACS) and Bg Autogiro

Bacs 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.

Note:

Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)

BECS is an automated payment method for Direct Debit in Australia and New Zealand while PAD does the same for Canada. GoCardless supports both.

For 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.

If the customer has already reached the payment source limit allowed for the site, pass replace_primary_payment_source as true. Alternatively, delete one of the payment sources first and then add the bank account payment source for the customer.

Note:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "2-letter(alpha2) ISO country code. Required when local bank details are provided, and not IBAN.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "bank_account" : { "type" : "object", "deprecated" : false, "description" : "Parameters for bank_account\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "iban" : { "type" : "string", "deprecated" : false, "description" : "Account holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html)\nplatform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details)\n", "maxLength" : 50, "minLength" : 10, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's first name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's last name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Account holder's company name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 250, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "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.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the account holder that is linked to the bank account.\n", "maxLength" : 50, "example" : null }, "bank_name" : { "type" : "string", "deprecated" : false, "description" : "Name of account holder's bank.\n", "maxLength" : 100, "example" : null }, "account_number" : { "type" : "string", "deprecated" : false, "description" : "Account holder's bank account number.\n", "maxLength" : 17, "minLength" : 4, "example" : null }, "routing_number" : { "type" : "string", "deprecated" : false, "description" : "Bank account routing number.\n", "maxLength" : 9, "minLength" : 3, "example" : null }, "bank_code" : { "type" : "string", "deprecated" : false, "description" : "Indicates the bank code.\n", "maxLength" : 20, "example" : null }, "account_type" : { "type" : "string", "deprecated" : false, "description" : "Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/)\nACH and Razorpay NetBanking users only. If not passed, account type is taken as null.\n\\* current -\n\nCurrent Account\n\\* savings -\n\nSavings Account\n\\* checking -\n\nChecking Account\n\\* business_checking -\n\nBusiness Checking Account\n", "enum" : [ "checking", "savings", "business_checking", "current" ], "example" : null }, "account_holder_type" : { "type" : "string", "deprecated" : false, "description" : "For Stripe ACH users only. Indicates the account holder type.\n\\* company -\n\nCompany Account.\n\\* individual -\n\nIndividual Account.\n", "enum" : [ "individual", "company" ], "example" : null }, "echeck_type" : { "type" : "string", "deprecated" : false, "description" : "For Authorize.net ACH users only. Indicates the type of eCheck.\n\\* ppd -\n\nPayment Authorization is prearranged between the customer and the merchant.\n\\* web -\n\nPayment Authorization obtained from the customer via the internet.\n\\* ccd -\n\nPayment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type.\n", "enum" : [ "web", "ppd", "ccd" ], "example" : null }, "swedish_identity_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 12, "minLength" : 10, "example" : null }, "billing_address" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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.

\n", "example" : null } }, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "bank_account" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

The API is only supported for the payment_method of type direct_debit.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "bank_account" : { "type" : "object", "deprecated" : false, "description" : "Parameters for bank_account\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's first name as per bank account.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's last name as per bank account.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Account holder's email address. All Direct Debit compliant emails will be sent to this email address.\n", "maxLength" : 70, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "bank_account" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "

Resource object representing payment_source

" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/vaulted_payment_methods/{vaulted-payment-method-id}" : { "get" : { "summary" : "Retrieve vaulted payment method", "operationId" : "retrieve_vaulted_payment_method", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "vaulted-payment-method-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/vaulted-payment-method-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "vaulted_payment_method" : { "$ref" : "#/components/schemas/VaultedPaymentMethod", "description" : "Resource object representing vaulted_payment_method" } }, "required" : [ "vaulted_payment_method" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:(?: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "virtual-bank-account-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/virtual-bank-account-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "

Resource object representing virtual_bank_account

" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "virtual-bank-account-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/virtual-bank-account-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "

Resource object representing virtual_bank_account

" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_virtual_bank_accounts", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[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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:[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"3bdjnDnsdQn\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this virtual bank account resource was last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this virtual bank account resource is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "Resource object representing virtual_bank_account" } }, "required" : [ "virtual_bank_account" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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. \nCustomer's email and virtual bank accounts will always be in sync.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})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{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address associated with the virtual bank account.\n", "maxLength" : 70, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the gateway account to use when creating the virtual bank account.

\n

Default behavior\nWhen not provided, Chargebee selects an applicable gateway account for the chosen scheme. Selection follows your site's Smart Routing rules.

", "maxLength" : 50, "example" : null }, "scheme" : { "type" : "string", "default" : "ach_credit", "deprecated" : false, "description" : "

Type of the credit transfer.

\n* mx_automated_bank_transfer -

MX Automated Bank Transfer

\n* sepa_credit -

SEPA Credit Transfer

\n

This scheme is deprecated. Instead of sepa_credit\nuse eu_automated_bank_transfer\n.

\n* eu_automated_bank_transfer -

EU Automated Bank Transfer

\n* ach_credit -

ACH Credit Transfer

\n

This scheme is deprecated. Instead of ach_credit\nuse us_automated_bank_transfer\n.

\n* jp_automated_bank_transfer -

JP Automated Bank Transfer

\n* us_automated_bank_transfer -

US Automated Bank Transfer

\n* gb_automated_bank_transfer -

UK Automated Bank Transfer

", "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" ], "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "

Resource object representing virtual_bank_account

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "virtual-bank-account-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/virtual-bank-account-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "

Resource object representing virtual_bank_account

" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 (VBA) for a customer using a permanent token obtained from a payment gateway.

Use this operation when you have already created a payment source at the gateway and obtained a permanent token (reference ID) for it.

\n

Prerequisites & Constraints

\n

Impacts

Virtual bank account

    \n
  • A new virtual bank account resource is created and associated with the customer. The virtual bank account includes details such as bank account number, routing number (or IBAN), bank name, and other payment instructions retrieved from the gateway using the provided reference ID.
  • \n
  • The email address for the VBA is set at the gateway from the customer.email attribute. Later, if the email address is updated for the customer, the email address for the VBA is also updated.
  • \n
\n

Implementation Notes

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [customer](/docs/api/customers) for whom you want to create a virtual bank account.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier (permanent token) used to fetch the payment source details from the gateway. For example, in Stripe it may be only the Stripe Customer ID (for example, cus_63MnDn0t6kfDW7), or a combination of Stripe Customer ID and Stripe Source ID separated by a forward slash (for example, cus_63MnDn0t6kfDW7/src_6WjCF20vT9WN1G).

\n

Constraints

", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the payment gateway account to use when creating the virtual bank account.

\n

Default behavior\nWhen not provided, Chargebee selects an applicable gateway account for the chosen scheme. Selection follows your site's Smart Routing rules.

", "maxLength" : 50, "example" : null }, "scheme" : { "type" : "string", "default" : "ach_credit", "deprecated" : false, "description" : "

The type of automated bank transfer scheme for the virtual bank account.

\n

Prerequisites

\n* mx_automated_bank_transfer -

Mexico Automated Bank Transfer scheme for Mexico-based customers.

\n

Prerequisites

\n* sepa_credit -

Deprecated

\n

SEPA Credit Transfer scheme for customers in the European Union.

\n* eu_automated_bank_transfer -

EU Automated Bank Transfer scheme for customers in the European Union.

\n

Prerequisites

\n* ach_credit -

Deprecated

\n

ACH Credit Transfer scheme for US-based customers.

\n* jp_automated_bank_transfer -

Japan Automated Bank Transfer scheme for Japan-based customers.

\n

Prerequisites

\n* us_automated_bank_transfer -

US Automated Bank Transfer scheme for US-based customers.

\n

Prerequisites

\n

US Automated Bank Transfer

\n* gb_automated_bank_transfer -

UK Automated Bank Transfer scheme for UK-based customers.

\n

Prerequisites

", "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" ], "example" : null } }, "required" : [ "customer_id", "reference_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "

Resource object representing virtual_bank_account

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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)\n, 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.\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**Limitation**\n\nThis request does not support copying of cards between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\nto 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account you want to copy the card.\n", "maxLength" : 50, "example" : null } }, "required" : [ "gateway_account_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "third_party_payment_method" : { "$ref" : "#/components/schemas/ThirdPartyPaymentMethod", "description" : "

Resource object representing third_party_payment_method

" } }, "required" : [ "third_party_payment_method" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n\nThis operation is obsoleted by the [Retrieve a payment source API](/docs/api/payment_sources/retrieve-a-payment-source)\n.\n\nRetrieves the credit card for the customer id.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-F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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "card" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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

This request is obsoleted by the Switch gateway account API\nfor Payment Sources.

Switches the gateway in which customer's card information is stored. This is applicable only if the payment method is card.

Limitation

This request does not support switching between Braintree and Stripe payment gateways. Contact Chargebee Support\nto perform those actions.

", "operationId" : "switch_gateway", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account you want to switch to.\n", "maxLength" : 50, "example" : null } }, "required" : [ "gateway_account_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "card", "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n, with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the Delete a payment source API\n.

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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n, with its additional options and improvements, obsoletes the Cards APIs\n. This operation is obsoleted by the following:

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

Legacy behavior:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "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:**\nSupported 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", "maxLength" : 300, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name.\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name.\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\\* mastercard -\n\nA MasterCard scheme.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card scheme.\n\\* visa -\n\nA Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if billing_state_code\nis provided.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

\n

.

", "maxLength" : 50, "example" : null } }, "required" : [ "expiry_month", "expiry_year", "number" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "

Resource object representing card

" } }, "required" : [ "card", "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "operationId" : "retrieve_a_promotional_credit", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "account-credit-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/account-credit-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "

Resource object representing promotional_credit

" } }, "required" : [ "promotional_credit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "operationId" : "list_promotional_credits", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUnique reference ID provided for promotional credits.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*id\\[is\\] = \"1bkfc8dw2o\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1bkfc8dw2o", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this promotional credit resource is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nType of promotional credits. Possible values are : increment, decrement.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is\\] = \"increment\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "increment", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`increment\\` - Increment \\* \\`decrement\\` - Decrement\n", "enum" : [ "increment", "decrement" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`increment\\` - Increment \\* \\`decrement\\` - Decrement\n", "enum" : [ "increment", "decrement" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`increment\\` - Increment \\* \\`decrement\\` - Decrement\n", "enum" : [ "increment", "decrement" ], "pattern" : "^\\[(increment|decrement)(,(increment|decrement))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`increment\\` - Increment \\* \\`decrement\\` - Decrement\n", "enum" : [ "increment", "decrement" ], "pattern" : "^\\[(increment|decrement)(,(increment|decrement))*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*customer_id\\[is\\] = \"4gkYnd21ouvW\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gkYnd21ouvW", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "Resource object representing promotional_credit" } }, "required" : [ "promotional_credit" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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).\n\nFor 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.\n\nIf you do not pass any amount as the input parameter then, it will deduct the whole available amount from the credit balance.\n", "operationId" : "deduct_promotional_credits", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Promotional credits amount.\n", "minimum" : 0, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Amount in decimal.\n", "maxLength" : 33, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for promotional credit.\n", "maxLength" : 3, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description of this promotional credits.\n", "maxLength" : 250, "example" : null }, "credit_type" : { "type" : "string", "default" : "general", "deprecated" : false, "description" : "Type of promotional credits provided to customer.\n\\* general -\n\nGeneral\n\\* referral_rewards -\n\nReferral\n\\* loyalty_credits -\n\nLoyalty Credits\n", "enum" : [ "loyalty_credits", "referral_rewards", "general" ], "example" : null }, "reference" : { "type" : "string", "deprecated" : false, "description" : "Describes why promotional credits were provided.\n", "maxLength" : 500, "example" : null } }, "required" : [ "customer_id", "description" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "

Resource object representing promotional_credit

" } }, "required" : [ "customer", "promotional_credit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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).\n\nFor example,\n\n* 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.\n* 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.\n* 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.\n", "operationId" : "set_promotional_credits", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Promotional credits amount.\n", "minimum" : 0, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Amount in decimal.\n", "maxLength" : 33, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for promotional credit.\n", "maxLength" : 3, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description of this promotional credits.\n", "maxLength" : 250, "example" : null }, "credit_type" : { "type" : "string", "default" : "general", "deprecated" : false, "description" : "Type of promotional credits provided to customer. \\\\\\* general - General \\\\\\* referral_rewards - Referral \\\\\\* loyalty_credits - Loyalty Credits\n", "enum" : [ "loyalty_credits", "referral_rewards", "general" ], "example" : null }, "reference" : { "type" : "string", "deprecated" : false, "description" : "Describes why promotional credits were provided.\n", "maxLength" : 500, "example" : null } }, "required" : [ "customer_id", "description" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "

Resource object representing promotional_credit

" } }, "required" : [ "customer", "promotional_credit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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).\n\nFor example, if a customer has credits of $10, if you pass the **amount** as $10, then the customer's credit balance would become $20.\n", "operationId" : "add_promotional_credits", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Promotional credits amount.\n", "minimum" : 0, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Amount in decimal.\n", "maxLength" : 33, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for promotional credit.\n", "maxLength" : 3, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description of this promotional credits.\n", "maxLength" : 250, "example" : null }, "credit_type" : { "type" : "string", "default" : "general", "deprecated" : false, "description" : "Type of promotional credits provided to customer. \\\\\\* general - General \\\\\\* referral_rewards - Referral \\\\\\* loyalty_credits - Loyalty Credits\n", "enum" : [ "loyalty_credits", "referral_rewards", "general" ], "example" : null }, "reference" : { "type" : "string", "deprecated" : false, "description" : "Describes why promotional credits were provided.\n", "maxLength" : 500, "example" : null } }, "required" : [ "customer_id", "description" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "

Resource object representing promotional_credit

" } }, "required" : [ "customer", "promotional_credit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "delete_line_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "line_items" : { "type" : "object", "deprecated" : false, "description" : "The list of line items which have to be deleted.\n", "properties" : { "id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "line_items" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Removes the specified adjustment credit or refundable credit allocation applied to the invoice.

\n

Prerequisites & Constraints

\n

Impacts

Invoice

    \n
  • The amount_due increases by the allocations[i].allocated_amount of the credit note.
  • \n
  • The amount_adjusted decreases by the allocations[i].allocated_amount of the credit note if the credit_note.type is adjustment.
  • \n
  • The write_off_amount decreases by the allocations[i].allocated_amount of the credit note if the credit_note.create_reason_code is Write Off.
  • \n
  • If the invoice status was payment_due, not_paid, or posted, the status does not change after the credit note is removed.
  • \n
  • If the invoice status was paid:\n
      \n
    • The status changes to posted if the due_date is in the future.
    • \n
    • The status changes to not_paid if the due date is in the past.
    • \n
    \n
  • \n

Credit note

    \n
  • The amount_allocated decreases and the amount_available increases by the allocations[i].allocated_amount, where i is such that allocations[i].invoice_id = invoice.id.
  • \n
\n

Implementation Notes

Before you call this API, make sure that:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][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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,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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Credit-note id.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note", "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Removes a payment transaction that was applied to an invoice and moves the amount to the customer's excess payments balance.

This API does not refund the payment to the customer. To refund a payment transaction, use one of the following APIs:

\n

Prerequisites & Constraints

\n

Impacts

Invoice

    \n
  • The amount_due on the invoice increases by the amount of the removed payment.
  • \n
  • If the invoice status was payment_due, not_paid, or posted, the status does not change after a payment is removed.
  • \n
  • If the invoice status was paid:\n
      \n
    • The status changes to posted if the due_date is in the future.
    • \n
    • The status changes to payment_due if the due_date is in the past and auto_collection is off, or if auto_collection is on and dunning is in progress for the invoice.
    • \n
    • The status changes to not_paid if the due date is in the past, auto_collection is on, and dunning was not in progress for the invoice.
    • \n
    \n
  • \n

Transaction

The amount_unused on the transaction increases by the amount of the removed payment.

Customer excess payments balance

The customer's excess_payments balance increases by the amount of the removed payment.

Invoice dunning process

    \n
  • If the invoice status was payment_due before this operation, and dunning was in progress for the invoice, the dunning process continues as configured.
  • \n
  • If the invoice status was paid before this operation, the dunning process does not resume.
  • \n
\n

Implementation Notes

Before you call this API, make sure that:

\n

Related APIs

Refund a payment

Record an offline refund

\n

FAQs

Can I remove payments from multiple invoices at once?

Yes. To remove payments from multiple invoices in bulk, go to Settings > Import > Export Data > Bulk Operation, and select Remove payment from Invoice.

How can I track the history of payments removed from invoices?

You can view the history of payments removed from invoices in the Activity Log section of the invoice. The log shows all actions taken, including payments removed.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the transaction.\n", "maxLength" : 40, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "invoice", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\".\n", "operationId" : "stop_dunning_for_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[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,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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Applies payment to a single invoice. You can either specify individual payment transactions as parameters, or Chargebee applies any available excess payments for that customer. If you specify individual transactions then any un-applied amount in those transactions will be used.

\n

Prerequisites & Constraints

\n

Impacts

Invoice

Invoice's amount_due is updated to reflect the applied payment. If no amount remains, the invoice status becomes paid.

Transactions

When a payment is applied to an invoice, the amount_unused field of the associated transaction(s) is reduced accordingly.

Accounting Integrations

Synchronization to the accounting system will not proceed if the linked transaction contains a surplus balance.

\n

Implementation Notes

Before calling this API, ensure the following:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "transactions" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transactions\n", "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.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "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\n, or invoice.amount_due\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "transactions" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_payment_schedule_scheme" : { "post" : { "summary" : "Apply payment schedule scheme to an invoice", "description" : "

Applying a payment schedule scheme to an invoice creates payment schedules, enabling the invoice to be paid in multiple, scheduled payments.

Note:\nThe invoice must be in payment_due\n.

", "operationId" : "apply_payment_schedule_scheme_to_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "scheme_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the payment_schedule_scheme\n, used to create the payment schedules.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The part of the invoice.amount_due\nto be distributed across the payment schedules. If not specified, the entire invoice.amount_due\nis considered by default.

", "minimum" : 0, "example" : null } }, "required" : [ "scheme_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Use this operation when:

Voiding preserves the audit trail and allows for future reference and compliance without removing the original record.

Regenerate or import an invoice

\n

Prerequisites & Constraints

\n

Impacts

Invoices

    \n
  • Chargebee sets the invoice status to voided.
  • \n

Subscription

    \n
  • If the invoice is for the current term of a subscription and you change the subscription later within the same term with proration enabled, Chargebee does not issue prorated credits.
  • \n

Customer

Credit Note

    \n
  • If the Void invoices with credit note setting is enabled, Chargebee creates a credit note for the voided invoice:\n
      \n
    • The credit note type is adjustment.
    • \n
    • The credit note status is adjusted.
    • \n
    • The credit note create_reason_code is Invoice Void.
    • \n
    \n
  • \n

Usages

    \n
  • Chargebee delinks the usage resources associated with the invoice by clearing the invoice_id attribute.
  • \n

Integrations

    \n
  • Review how voiding an invoice impacts your accounting integrations.
  • \n
\n

Implementation Notes

Before calling this API, ensure the following:

", "operationId" : "void_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "void_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 invoice. A one-time charge is a charge that is added ad hoc to the invoice and does not represent a predefined item price. It appears in the invoice as a line_item of 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this lineitem.\n", "maxLength" : 250, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* retail -\n\nTransaction is a sale to an end user\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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)\nintegration.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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)\nintegration.\n", "example" : null }, "avalara_tax_code" : { "type" : "string", "deprecated" : false, "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)\n.\n", "maxLength" : 50, "example" : null }, "hsn_code" : { "type" : "string", "deprecated" : false, "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the one-time charge is mapped for calculating the customer's tax in India. Applicable when both the conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee. .\n", "maxLength" : 50, "example" : null }, "taxjar_product_code" : { "type" : "string", "deprecated" : false, "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)\n.\n", "maxLength" : 50, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this charge needs to be created. Applicable for consolidated invoice.\n", "maxLength" : 50, "example" : null }, "line_item" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_item\n", "properties" : { "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge ends.\n", "example" : null } }, "example" : null } }, "required" : [ "amount", "description" ], "example" : null }, "encoding" : { "line_item" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\nTo support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually.\nThis endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/payment_schedules" : { "get" : { "summary" : "Retrieve payment schedules for an invoice", "description" : "This endpoint retrieves payment schedules created for an invoice.\n", "operationId" : "retrieve_payment_schedules_for_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_schedules" : { "type" : "array", "description" : "

Resource object representing payment_schedule

", "items" : { "$ref" : "#/components/schemas/PaymentSchedule", "description" : "Resource object representing payment_schedule" }, "example" : null } }, "required" : [ "payment_schedules" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Write off the specified invoice.

Use this operation to mark invoices as settled when they remain unpaid after multiple attempts to collect payment.

Reverse a write-off

You can reverse the write-off by removing the linked credit note.

\n

Prerequisites & Constraints

\n

Impacts

Invoice

    \n
  • Chargebee sets the invoice status to paid.
  • \n
  • Chargebee sets the invoice write_off_amount to the invoice amount_due.
  • \n

Credit Note

    \n
  • Chargebee creates a credit note with the following attributes:\n
      \n
    • type is adjustment.
    • \n
    • create_reason_code is Write Off.
    • \n
    • total is invoice.amount_due.
    • \n
    \n
  • \n

Payment Schedules

RevRec

Accounting Integrations

    \n
  • Write-offs sync to accounting platforms based on configured sync rules. For more details, see the following documentation:\n\n
  • \n
\n

Implementation Notes

Before calling this API, ensure the following:

", "operationId" : "write_off_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note", "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 is enabled and it adds a charge-item price to a pending invoice. To collect the accumulated charges by closing the invoice, call 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this addon needs to be created. Applicable for consolidated invoice.\n", "maxLength" : 50, "example" : null }, "item_price" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_price\n", "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "A unique ID for your system to identify the item price.\n", "maxLength" : 100, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Item price quantity\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price or per-unit-price of the item price. By default, it is the value set\nfor the item_price.\nThis is only applicable when the pricing_model\nof the item_price\nis flat_fee\nor per_unit.\nThe value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the item starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the item ends.\n", "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "item_price" : { "style" : "deepObject", "explode" : true }, "item_tiers" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/pause_dunning" : { "post" : { "summary" : "Pause dunning for invoice", "description" : "

Pause dunning for the specified invoice until expected_payment_date. Chargebee cancels all configured payment collection retry attempts and dunning email notifications for the invoice until expected_payment_date.

Prerequisites

This operation is only permitted for an invoice that meets all the following conditions:

Automatic dunning resumption

Unless you resume dunning for the invoice, Chargebee attempts to collect payment on the expected_payment_date. If payment collection fails, the next action is taken as follows:

", "operationId" : "pause_dunning_for_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "expected_payment_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date and time at which dunning should resume.\n**See also** : [Dunning resumption process](/docs/api/invoices/resume-dunning-for-invoice).\n", "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments) to add to the invoice for this operation. This comment is displayed on the Chargebee Billing UI.\n**Note** : This comment does not appear on any customer-facing [hosted pages](/docs/api/hosted_pages) or documents, such as the [invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf).\n", "maxLength" : 300, "example" : null } }, "required" : [ "expected_payment_date" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_invoices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nThe invoice number. Acts as a identifier for invoice and typically generated sequentially.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"INVOICE_654\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "INVOICE_654", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on subscription_id.\nNOTE: Not to be used if *consolidated invoicing*\nis enabled.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"3bdjnDnsdQn\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nThe identifier of the customer this invoice belongs to.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"3bdjnDnsdQn\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "recurring", "in" : "query", "description" : "optional, boolean filter\n\nBoolean indicating whether this invoice belongs to a subscription. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*recurring\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent status of this invoice. Possible values are : paid, posted, payment_due, not_paid, voided, pending.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"paid\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "paid", "properties" : { "is" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null } } } }, { "name" : "price_type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe price type of the invoice. Possible values are : tax_exclusive, tax_inclusive.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*price_type\\[is\\] = \"tax_exclusive\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "tax_exclusive", "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } } }, { "name" : "date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe document date displayed on the invoice PDF.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*date\\[on\\] = \"1394532759\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "paid_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating the date \\& time this invoice got paid.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*paid_at\\[before\\] = \"1394532759\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "total", "in" : "query", "description" : "optional, in cents filter\n\nInvoiced 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.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*total\\[gt\\] = \"1000\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1000", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_paid", "in" : "query", "description" : "

optional, in cents filter

\n

Payments collected successfully for the invoice. This is the sum of linked_payments[].txn_amount\nfor all linked_payments[]\nthat have txn_status\nas success.\nSupported operators :\nis, is_not, lt, lte, gt, gte, between

\n

Example →\namount_paid[lt] = "800"

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

optional, in cents filter

\n

The unpaid amount that is due on the invoice. This is calculated as: total

\n\n

Example →\namount_due[lt] = "200"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "dunning_status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent dunning status of the invoice. Possible values are : in_progress, exhausted, stopped, success.\n\n**Supported operators :**\nis, is_not, in, not_in, is_present\n\n**Example →**\n*dunning_status\\[is\\] = \"in_progress\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "in_progress", "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "in" : { "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "payment_owner", "in" : "query", "description" : "optional, string filter\n\nPayment owner of an invoice.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*payment_owner\\[is\\] = \"payment_customer\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "payment_customer", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.\nSupported operators :\nafter, before, on, between

\n

Example →\nupdated_at[after] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "voided_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating the date \\& time this invoice got voided.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*voided_at\\[on\\] = \"1394532759\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "void_reason_code", "in" : "query", "description" : "optional, string filter\n\nReason 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** .\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*void_reason_code\\[is_not\\] = \"Other\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Other", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null } }, "example" : null } }, { "name" : "exclude", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "line_items", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "einvoice", "in" : "query", "description" : "Parameters for einvoice\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "status" : { "type" : "object", "deprecated" : false, "description" : "

The status of processing the e-invoice. To obtain detailed information about the current status\n, see message\n.

", "example" : "failed", "properties" : { "is" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `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.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `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.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "in" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `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.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "pattern" : "^\\[(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid)(,(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `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.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "pattern" : "^\\[(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid)(,(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid))*\\]$", "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice" } }, "required" : [ "invoice" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_before_capture" : { "post" : { "summary" : "Void authorizations before capture", "description" : "

Voids all outstanding scheduled-capture authorizations linked to an invoice before capture, then voids or writes off the invoice.

Use this operation when an invoice has an outstanding delayed-capture authorization that must be released before the invoice is either voided or written off. Use invoice_action to choose whether the invoice is voided or written off.

\n

Prerequisites & Constraints

\n

Impacts

Authorizations

    \n
  • Chargebee voids all eligible outstanding scheduled-capture authorizations linked to the invoice at the payment gateway.
  • \n

Invoice

    \n
  • When invoice_action is void, Chargebee voids the invoice. The invoice status becomes voided.
  • \n
  • When invoice_action is write_off, Chargebee writes off the invoice. The invoice status becomes paid, and write_off_amount is set to the invoice amount_due.
  • \n

Credit Note

    \n
  • When invoice_action is write_off, Chargebee creates an adjustment credit note for the write-off. The response includes the credit_note resource when one is generated.
  • \n
\n

Implementation Notes

Before calling this API, ensure that the scheduled-capture authorization is still outstanding. If it has already been captured, if no eligible authorization remains, or if another conflicting payment operation is in progress, the API returns HTTP 409 with api_error_code set to invalid_state_for_request.

", "operationId" : "void_authorizations_before_capture", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "void_reason_code" : { "type" : "string", "deprecated" : false, "description" : "

Reason code for voiding the invoice. Applicable only when invoice_action is void. Select from the reason codes configured in Settings > Configure Chargebee > Reason Codes > Invoices > Void invoice. This parameter is required when a void reason code is configured as mandatory. The codes are case-sensitive.

", "maxLength" : 100, "example" : null }, "invoice_action" : { "type" : "string", "deprecated" : false, "description" : "

Determines whether Chargebee voids or writes off the invoice after voiding all eligible outstanding scheduled-capture authorizations. Possible values are void and write_off. This is not related to Close a pending invoice.

\n

Default value

void

\n* void -

Voids the invoice after all eligible outstanding scheduled-capture authorizations are voided.

\n* write_off -

Writes off the invoice after all eligible outstanding scheduled-capture authorizations are voided. void_reason_code is not applicable for this value.

", "enum" : [ "void", "write_off" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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. Moreover, the automation can be overridden at the customer and subscription 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "invoice_note" : { "type" : "string", "deprecated" : false, "description" : "A note for this particular invoice. This, and [all other notes](/docs/api/invoices/invoice-object#notes)\nfor the invoice are displayed on the PDF invoice sent to the customer.\n", "maxLength" : 2000, "example" : null }, "remove_general_note" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Set as true\nto remove the general note\nfrom this invoice.

", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Set the [invoice date](/docs/api/invoices/invoice-object#date).\nMust 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)\nis used.\n", "example" : null }, "notes_to_remove" : { "type" : "object", "deprecated" : false, "description" : "Parameters for notes_to_remove\n", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Type of entity to which the note\nbelongs. To remove the general note, use the remove_general_note\nparameter.

\n* customer -

Entity that represents a customer.

\n* charge_item_price -

Indicates that this line item is based on charge Item Price

\n* coupon -

Entity that represents a coupon.

\n* addon_item_price -

Indicates that this line item is based on addon Item Price

\n* subscription -

Entity that represents a subscription of customer.

\n* plan_item_price -

Indicates that this line item is based on plan Item Price

", "enum" : [ "customer", "subscription", "coupon", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "Unique identifier of the [note](/docs/api/invoices/invoice-object#notes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "notes_to_remove" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Applies a customer's refundable credits to a specified invoice.

You can either specify the credit notes to be applied, or let Chargebee apply the available credit notes automatically.

\n

Prerequisites & Constraints

\n

Impacts

Invoice

    \n
  • The amount_due decreases by the amount of credits applied.
  • \n
  • The invoice status:\n
      \n
    • changes to paid if the applied credits fully cover the amount due.
    • \n
    • remains unchanged if the applied credits only partially cover the amount due.
    • \n
    \n
  • \n

Credit Notes

The credit note status:

    \n
  • changes to refunded if the entire credit_note.amount_available is applied to the invoice.
  • \n
  • remains refund_due if only part of the credit_note.amount_available is applied.
  • \n
\n

Implementation Notes

Before calling this API, make sure the following conditions are met:

\n

Related APIs

Apply payments for an invoice

Collect payment for an invoice

Record an invoice payment

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]))\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "credit_notes" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_notes\n", "properties" : { "id" : { "type" : "array", "description" : "

The ID of the credit note to be applied to the invoice.

\n

Constraints

\n

Default behavior

When the parameter is not passed, available refundable credits with the customer are applied to the invoice.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "credit_notes" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_an_invoice", "parameters" : [ { "name" : "line_items_limit", "in" : "query", "description" : "Specify the maximum number of line items to include in the response. \n**Note:**\n\n* Applicable only when Enterprise-scale Invoicing is enabled.\n* Enterprise-scale Invoicing is currently in **Private Beta** . Please reach out to [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 100, "deprecated" : false, "maximum" : 300, "minimum" : 1, "example" : null } }, { "name" : "line_items_offset", "in" : "query", "description" : "

Specify the starting point for retrieving line items. Use the value from the line_items_next_offset attribute of the previous retrieve API response.

\n

Note:

", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 1000, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 and one-time charges. The item prices must belong to items of type charge.

You can optionally override the line item name and description displayed on the invoice for charge-item prices and one-time charges. When create_pending_invoice is true, the invoice is created in pending status without collecting payment. You can review the invoice, add more charges if needed, and close it later via the close a pending invoice operation.

One-time charges are represented in an invoice as line_items with entity_type adhoc.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

Unique ID of the customer this invoice should be created for. Either this or subscription_id must be provided.

\n

Note

The invoice is linked to the same business entity as this customer.

\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

Unique ID of the subscription this invoice should be created for. Either this or customer_id must be provided.

\n

Note

The invoice is linked to the same business entity as this subscription.

\n", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the invoice amount.\n", "maxLength" : 3, "example" : null }, "invoice_note" : { "type" : "string", "deprecated" : false, "description" : "A note for this particular invoice. This, and [all other notes](/docs/api/invoices/invoice-object#notes)\nfor the invoice are displayed on the PDF invoice sent to the customer.\n", "maxLength" : 2000, "example" : null }, "remove_general_note" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Set as true\nto remove the general note\nfrom this invoice.

", "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "authorization_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "Authorization transaction to be captured.\n", "maxLength" : 40, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for this payment.\n", "maxLength" : 40, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "

If specified, the customer level auto collection will be overridden.

\n

Note

\n* on -

Whenever an invoice is created, an automatic attempt will be made to charge.

\n* off -

Whenever an invoice is created as payment due.

", "enum" : [ "on", "off" ], "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The [Net D](https://www.chargebee.com/docs/billing/2.0/subscriptions/net_d) value explicitly set for this invoice. Net D is the number of days within which the invoice must be paid. When this value is provided, it overrides the payment terms defined at the subscription or customer level. **Note:** This value is used only for this invoice operation and does not update the customer or subscription records.\n", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\ntaxes\nand\nline_item_taxes\nare 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.

", "example" : null }, "create_pending_invoice" : { "type" : "boolean", "deprecated" : false, "description" : "

When set to true, the invoice is created with status as pending and payment is not collected. The invoice can be closed later via the close a pending invoice operation.

\n

Prerequisites

\n

Constraints

", "example" : null }, "token_id" : { "type" : "string", "deprecated" : false, "description" : "Token generated by Chargebee JS representing payment method details.\n", "maxLength" : 40, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "retain_payment_source" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Indicates whether the payment source should be retained for the customer.\n", "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\\* customer -\n\nPass this value to indicate that the request is initiated by the customer\n\\* merchant -\n\nPass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Parameters for statement_descriptor\n", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment descriptor text\n", "maxLength" : 65000, "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "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)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card scheme.\n\\* mastercard -\n\nA MasterCard scheme.\n\\* visa -\n\nA Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if billing_state_code\nis provided.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "bank_account" : { "type" : "object", "deprecated" : false, "description" : "Parameters for bank_account\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "iban" : { "type" : "string", "deprecated" : false, "description" : "Account holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html)\nplatform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details)\n", "maxLength" : 50, "minLength" : 10, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's first name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's last name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Account holder's company name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 250, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "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.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the account holder that is linked to the bank account.\n", "maxLength" : 50, "example" : null }, "bank_name" : { "type" : "string", "deprecated" : false, "description" : "Name of account holder's bank.\n", "maxLength" : 100, "example" : null }, "account_number" : { "type" : "string", "deprecated" : false, "description" : "Account holder's bank account number.\n", "maxLength" : 17, "minLength" : 4, "example" : null }, "routing_number" : { "type" : "string", "deprecated" : false, "description" : "Bank account routing number.\n", "maxLength" : 9, "minLength" : 3, "example" : null }, "bank_code" : { "type" : "string", "deprecated" : false, "description" : "Indicates the bank code.\n", "maxLength" : 20, "example" : null }, "account_type" : { "type" : "string", "deprecated" : false, "description" : "Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/)\nACH and Razorpay NetBanking users only. If not passed, account type is taken as null.\n\\* checking -\n\nChecking Account\n\\* business_checking -\n\nBusiness Checking Account\n\\* savings -\n\nSavings Account\n\\* current -\n\nCurrent Account\n", "enum" : [ "checking", "savings", "business_checking", "current" ], "example" : null }, "account_holder_type" : { "type" : "string", "deprecated" : false, "description" : "For Stripe ACH users only. Indicates the account holder type.\n\\* individual -\n\nIndividual Account.\n\\* company -\n\nCompany Account.\n", "enum" : [ "individual", "company" ], "example" : null }, "echeck_type" : { "type" : "string", "deprecated" : false, "description" : "For Authorize.net ACH users only. Indicates the type of eCheck.\n\\* ppd -\n\nPayment Authorization is prearranged between the customer and the merchant.\n\\* ccd -\n\nPayment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type.\n\\* web -\n\nPayment Authorization obtained from the customer via the internet.\n", "enum" : [ "web", "ppd", "ccd" ], "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "[two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html)\nISO country code. Required when local bank details are provided, and not IBAN.\n", "maxLength" : 50, "example" : null }, "swedish_identity_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 12, "minLength" : 10, "example" : null }, "billing_address" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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.

\n", "example" : null } }, "example" : null }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_method\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* go_pay -\n\nPayments made via GoPay\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* qpay -\n\nPayments made via Qpay.\n\\* pix -\n\nPayments made via Pix\n\\* pay_by_bank -\n\nPay By Bank\n\\* sofort -\n\nPayments made via Sofort.\n\\* twint -\n\nPayments made via Twint\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* giropay -\n\nPayments made via giropay.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* paypay -\n\nPayments made via PayPay\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* upi -\n\nUPI Payments.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* tamara -\n\nPayments made via Tamara.\n\\* payme -\n\nPayments made via PayMe\n\\* pay_to -\n\nPayments made via PayTo\n\\* pay_co -\n\nPayments made via PayCo\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* klarna -\n\nPayments made via Klarna.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* swish -\n\nPayments made via Swish\n\\* venmo -\n\nPayments made via Venmo\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* dana -\n\nPayments made via Dana.\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* gcash -\n\nPayments made via GCash.\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* trustly -\n\nTrustly\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor 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:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 65000, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "

ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

If you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, then XI\n(the code for United Kingdom - Northern Ireland\n) is available as an option.

", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "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.\n\\* card -\n\ncard\n\\* twint -\n\nPayments made via Twint\n\\* dotpay -\n\ndotpay\n\\* faster_payments - \\* upi -\n\nupi\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* klarna -\n\nPayments made via Klarna.\n\\* payme -\n\nPayments made via PayMe\n\\* google_pay -\n\ngoogle_pay\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* pix -\n\nPix\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* ideal -\n\nideal\n\\* boleto -\n\nboleto\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* direct_debit -\n\ndirect_debit\n\\* sepa_instant_transfer - \\* bancontact -\n\nbancontact\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* qpay -\n\nPayments made via Qpay.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* dana -\n\nPayments made via Dana.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* swish -\n\nPayments made via Swish\n\\* go_pay -\n\nPayments made via GoPay\n\\* trustly -\n\nTrustly\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* venmo - \\* alipay -\n\nPayments made via Alipay.\n\\* tamara -\n\nPayments made via Tamara.\n\\* pay_to - \\* pay_co -\n\nPayments made via PayCo\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* paypay -\n\nPayPay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* pay_by_bank -\n\nPay By Bank\n\\* apple_pay -\n\napple_pay\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* gcash -\n\nPayments made via GCash.\n\\* giropay -\n\ngiropay\n\\* sofort -\n\nsofort\n\\* amazon_payments -\n\namazon_payments\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "item_prices" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_prices\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "A unique ID for your system to identify the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Item price quantity\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price or per-unit-price of the item price. By default, it is the value set\nfor the item_price.\nThis is only applicable when the pricing_model\nof the item_price\nis flat_fee\nor per_unit.\nThe value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the item starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the item ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "The line item name to display on the invoice for this charge item. \n**Default value**\n\n* The invoice name defined for the item in the product catalog.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "entity_description" : { "type" : "array", "description" : "Descriptive text displayed below the line item name on the invoice for this charge item. \n**Default value**\n\n* The [item price description](/docs/api/item_prices/item_price-object#description) from the product catalog.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price to which this tier belongs.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "entity_description" : { "type" : "array", "description" : "Descriptive text for this one-time charge displayed on the invoice, shown below the line item name.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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 ).\nProvide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "The name of this one-time charge as displayed on the invoice line item.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "taxable" : { "type" : "array", "description" : "The amount to be charged is taxable or not.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "tax_profile_id" : { "type" : "array", "description" : "Tax profile of the charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "hsn_code" : { "type" : "array", "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* retail -\n\nTransaction is a sale to an end user\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the charge starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the charge ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "notes_to_remove" : { "type" : "object", "deprecated" : false, "description" : "Parameters for notes_to_remove\n", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Type of entity to which the note\nbelongs. To remove the general note, use the remove_general_note\nparameter.

\n* charge_item_price -

Indicates that this line item is based on charge Item Price

\n* plan_item_price -

Indicates that this line item is based on plan Item Price

\n* coupon -

Entity that represents a coupon.

\n* addon_item_price -

Indicates that this line item is based on addon Item Price

\n* customer -

Entity that represents a customer.

\n* subscription -

Entity that represents a subscription of customer.

", "enum" : [ "customer", "subscription", "coupon", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "Unique identifier of the [note](/docs/api/invoices/invoice-object#notes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "apply_on" ], "example" : null } }, "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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, custom fields, 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. \n**Note:**\nIncase, 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.\n", "operationId" : "update_invoice_details", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "VAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number)\n.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* invalid -\n\nAddress is invalid.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "A description of the transaction that helps your customer easily recognize it.\n", "maxLength" : 65000, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "statement_descriptor" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Records an offline payment for an invoice.

Use this API to record payments that you receive outside Chargebee, such as bank transfers or checks, so that you can reconcile them against invoices.

\n

Prerequisites & Constraints

\n

Impacts

Invoice

    \n
  • The amount_due on the invoice decreases by transaction[amount] when the transaction[status] is success.
  • \n
  • The invoice status changes to paid if the amount_due on the invoice becomes zero because of this payment. Otherwise, the status remains unchanged.
  • \n

Customer

If the recorded payment exceeds the invoice's amount_due, the excess is added to the customer's excess_payments balance.

\n

Implementation Notes

Before calling this API, ensure the following:

", "operationId" : "record_an_invoice_payment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the payment.\n", "maxLength" : 300, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The payment transaction amount.

\n

Default value

", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction\n\\* cash -\n\nCash\n\\* other -\n\nPayment Methods other than the above types\n\\* custom -\n\nCustom payment method. \n**Prerequisite**\n\n* [Custom payment methods](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/custom-payment-methods&ref=feature) must be enabled in Chargebee Billing.\n\\* check -\n\nCheck\n\\* bank_transfer -\n\nBank Transfer\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. e.g check number in case of 'check' payments.\n", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "

A unique identifier for the custom payment method of this transaction.

\n

Prerequisite

", "maxLength" : 50, "example" : null }, "id_at_gateway" : { "type" : "string", "deprecated" : false, "description" : "The id with which this transaction is referred in gateway.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of this transaction.

\n* late_failure -

Indicates that a previously successful payment transaction has failed due to a late failure notification from the payment gateway. Common reasons include insufficient funds or a closed bank account.\nPass the transaction[error_code] and transaction[error_text] to identify the reason for failure.\nThe amount_due on the invoice or the customer's excess_payments balance is not affected when this status is set.

\n* failure -

Transaction failed. Pass the transaction[error_code] and transaction[error_text] to identify the reason for failure.\nThe amount_due on the invoice or the customer's excess_payments balance is not affected when this status is set.

\n* success -

The transaction was successful.

\n

Impacts

", "enum" : [ "success", "failure", "late_failure" ], "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "

Error code for the transaction failure. This is typically set by the payment gateway when a transaction fails.

\n

Prerequisite

", "maxLength" : 100, "example" : null }, "error_text" : { "type" : "string", "deprecated" : false, "description" : "

Error message for transaction failure. This is typically set by the payment gateway when a transaction fails.

\n

Prerequisite

", "maxLength" : 65000, "example" : null } }, "required" : [ "payment_method" ], "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "invoice", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Void the invoice

If the invoice was generated incorrectly, void it instead of deleting it. Voiding preserves the audit trail and allows for future reference and compliance without removing the original record.

Regenerate or import an invoice

\n

Prerequisites & Constraints

\n

Impacts

Invoices

    \n
  • The invoice is marked as deleted = true and can only be retrieved using the List invoices API by using the parameter include_deleted=true.
  • \n
  • If the invoice is the first invoice for a subscription or customer (invoice.first_invoice = true), the next invoice generated for the subscription or customer is marked as the first invoice.
  • \n

Subscription

    \n
  • If the invoice is for the current term of a subscription and the subscription is changed later with proration enabled, no prorated credits are issued.
  • \n

Usages

    \n
  • Deleting an invoice permanently deletes all associated usages. To regenerate the data, add or bulk import usages and then regenerate the invoice.
  • \n

Usage Events

    \n
  • Deleting an invoice does not delete the associated usage_event resources.
  • \n

Integrations

    \n
  • Verify the impacts of deleting an invoice on your accounting integrations.
  • \n
\n

Implementation Notes

Before calling this API, ensure the following:

", "operationId" : "delete_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 300, "example" : null }, "claim_credits" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether to put prorated credits back to the subscription or ignore while deleting the invoice.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Use this API to import invoices from your other billing or accounting system into Chargebee Billing. You can import both current-term and historical invoices.

Caution: Importing current-term invoices\nTo ensure accurate proration for any changes to the subscription in the current term, import only one current-term invoice. Chargebee considers only the first imported invoice for the current term when calculating proration. If you have multiple invoices for the current term in the source system, consolidate them into a single invoice before importing it into Chargebee.

\n

Impacts

RevenueStory

Accounting Integrations

\n

Implementation Notes

", "operationId" : "import_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The invoice ID (also known as the invoice number). Must be unique so that it does not conflict with any existing invoice.id.

", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the invoice.\n", "maxLength" : 3, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the [customer](/docs/api/customers) resource to which this invoice belongs.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the [subscription](/docs/api/subscriptions) resource to which this invoice belongs.\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of the invoice.\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "tax_override_reason" : { "type" : "string", "deprecated" : false, "description" : "The reason for exempting the invoice from tax. (Applicable only for exempted invoices.).\n\\* zero_rated -\n\nIf the rate of tax is 0% and no Sales/ GST tax is collectable for that line item\n\\* export -\n\nThe customer is from a non-taxable region or the billing address and shipping address are unavailable.\n\\* customer_exempt -\n\nThe customer is [exempted](/docs/api/customers/customer-object#taxability)\nfrom tax.\n\\* tax_not_configured_external_provider -\n\nIf the tax is not configured for the country in 3rd party tax provider.\n\\* id_exempt -\n\nThe 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)\nor [UK VAT](https://www.chargebee.com/docs/uk-vat.html)\nis enabled.)\n\\* high_value_physical_goods -\n\nIf physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied\n\\* product_exempt -\n\nIf the Plan or Addon is marked as Tax exempt\n\\* region_non_taxable -\n\nIf the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction\n\\* zero_value_item -\n\nIf the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.\n", "enum" : [ "zero_rated", "id_exempt", "customer_exempt", "region_non_taxable", "product_exempt", "export", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "Vat Number. Required if this invoice is VAT exempted.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date when invoice raised.\n", "example" : null }, "total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Invoice total amount.\n", "minimum" : 0, "example" : null }, "round_off" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "[Round off amount](/docs/api/invoices/invoice-object#round_off_amount).\n", "maximum" : 99, "minimum" : -99, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Current status of this invoice.

\n* not_paid -

Indicates the payment is not made and all attempts to collect is failed.

\n* voided -

Indicates a voided invoice.

\n* paid -

Indicates a paid invoice.

\n* posted -

Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period.

\n* pending -

The invoice 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_invoicesattribute is set to true.\nThe invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.

\n* payment_due -

Indicates the payment is not yet collected and is being retried as per retry settings.

", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating the date \\& time this invoice got voided.\n", "example" : null }, "void_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "is_written_off" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If is_written_off is true then the invoice is written off.\n", "example" : null }, "write_off_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Amount written off against this invoice.\nIf this value is not present then the due amount of the invoice will be written off.\n", "minimum" : 0, "example" : null }, "write_off_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the write_off invoice has occurred.\nThis is a mandatory field if is_written_off is true. The same date reflects on the created credit note.\n", "example" : null }, "due_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The due date of the invoice.\n", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

", "example" : null }, "has_advance_charges" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Boolean indicating any advance charge is present in this invoice.\n", "example" : null }, "use_for_proration" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If the invoice falls within the subscription current term will be used for proration.\n", "example" : null }, "paid_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Timestamp when the invoice was paid. Applicable only when status is paid.

", "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the credit note.\n\nThis is a mandatory field if is_written_off is true.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_items\n", "properties" : { "id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "Start date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "End date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "subscription_id" : { "type" : "array", "description" : "

A unique identifier for the subscription resource to which this line item belongs.

\n

Note

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "

Description for this line item. Append - prorated charges to the description if the line item is prorated. This will prevent it from being considered for MRR calculations.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "Unit amount of the line item.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "

Quantity of the recurring item which is represented by this line item. For metered line items, this value is updated from usages once when the invoice is generated as pending and finally when the invoice is closed.\nQuantity of the recurring item which is represented by this line item.

", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Total amount of this lineitem. Not required if the line_items\\[unit_amount\\] param is passed\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "amount_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the modelled entity this line item is based on.

\n* plan_item_price -

Indicates that this line item corresponds to an item_price of item_type plan.

\n* addon_item_price -

Indicates that this line item corresponds to an item_price of item_type addon.

\n* charge_item_price -

Indicates that this line item corresponds to an item_price of item_type charge.

\n* adhoc -

Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case

", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "The ID of the entity that this line item corresponds to.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount1_entity_id" : { "type" : "array", "description" : "First item level discount entity id\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount1_amount" : { "type" : "array", "description" : "First item level discount amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "item_level_discount2_entity_id" : { "type" : "array", "description" : "Second item level discount entity id\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount2_amount" : { "type" : "array", "description" : "Second item level discount amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax1_name" : { "type" : "array", "description" : "First tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax1_amount" : { "type" : "array", "description" : "First tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax2_name" : { "type" : "array", "description" : "Second tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax2_amount" : { "type" : "array", "description" : "Second tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax3_name" : { "type" : "array", "description" : "Third tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax3_amount" : { "type" : "array", "description" : "Third tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax4_name" : { "type" : "array", "description" : "Fourth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax4_amount" : { "type" : "array", "description" : "Fourth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax5_name" : { "type" : "array", "description" : "Fifth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax5_amount" : { "type" : "array", "description" : "Fifth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax6_name" : { "type" : "array", "description" : "Sixth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax6_amount" : { "type" : "array", "description" : "Sixth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax7_name" : { "type" : "array", "description" : "Seventh tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax7_amount" : { "type" : "array", "description" : "Seventh tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax8_name" : { "type" : "array", "description" : "Eighth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax8_amount" : { "type" : "array", "description" : "Eighth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax9_name" : { "type" : "array", "description" : "Ninth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax9_amount" : { "type" : "array", "description" : "Ninth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax10_name" : { "type" : "array", "description" : "Tenth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax10_amount" : { "type" : "array", "description" : "Tenth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "proration_mode" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null }, "example" : null }, "created_at" : { "type" : "array", "description" : "", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "description" ], "example" : null }, "payment_reference_numbers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_reference_numbers\n", "properties" : { "id" : { "type" : "array", "description" : "

If id\nis not provided then our system will automatically generate a unique id.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

This attribute helps type\nfield in the API, specifies how to reconcile offline payments, and generate payment_reference_number\non invoices based on country-specific rules. Setting the type\nfield generates payment_reference_number\nfor the respective country and includes them on the invoice for correct reconciliation.

\n* swiss_reference -

Switzerland based number calculated using the recursive MOD 10 algorithm for QR references, or the MOD 97 algorithm for ISO 11649 creditor references, based on the reference type.

\n* kid -

The KID number (kundeidentifikasjon) in Norway is an abbreviation for "Customer identification". It is used to associate payments with the customer and invoice.

\n* fik -

Denmark based number calculated using recursive MOD 10 algorithm.

\n* 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.

\n* 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.

", "enum" : [ "kid", "ocr", "frn", "fik", "swiss_reference" ], "example" : null }, "example" : null }, "number" : { "type" : "array", "description" : "

If you have already generated a payment_reference_number\nin 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\nAPI.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "number", "type" ], "example" : null }, "line_item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_item_tiers\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "quantity_used" : { "type" : "array", "description" : "The number of units purchased in a range.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "quantity_used_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null } }, "required" : [ "line_item_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "The unique id of the line item that this deduction is for.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "

When the deduction is due to a coupon\n, then this is the id\nof the coupon.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this deduction.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The amount deducted.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "taxes" : { "type" : "object", "deprecated" : false, "description" : "Parameters for taxes\n", "properties" : { "name" : { "type" : "array", "description" : "The name of the tax applied.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "rate" : { "type" : "array", "description" : "The rate of tax used to calculate tax amount. \n**Impacts**\n\n* None. Although required, this parameter is not used by Chargebee.\n", "items" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Total tax amount charged for this invoice\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description of tax\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "juris_type" : { "type" : "array", "items" : { "type" : "string", "default" : "other", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* country -\n\nThe tax jurisdiction is a country\n\\* special -\n\nSpecial tax jurisdiction.\n\\* state -\n\nThe tax jurisdiction is a state\n\\* city -\n\nThe tax jurisdiction is a city\n\\* other -\n\nJurisdictions other than the ones listed above.\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* county -\n\nThe tax jurisdiction is a county\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "example" : null }, "juris_name" : { "type" : "array", "description" : "The name of the tax jurisdiction\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "juris_code" : { "type" : "array", "description" : "The tax jurisdiction code\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null } }, "required" : [ "name", "rate" ], "example" : null }, "payments" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payments\n", "properties" : { "id" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Payment made for this invoice.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "payment_method" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Mode of payment\n\\* check -\n\nCheck\n\\* bank_transfer -\n\nBank Transfer\n\\* custom -\n\nCustom\n\\* other -\n\nPayment Methods other than the above types\n\\* cash -\n\nCash\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "example" : null }, "date" : { "type" : "array", "description" : "Payment date\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "reference_number" : { "type" : "array", "description" : "Reference number for this payment\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "minLength" : 1, "example" : null }, "example" : null } }, "required" : [ "amount", "payment_method" ], "example" : null }, "notes" : { "type" : "object", "deprecated" : false, "description" : "Parameters for notes\n", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Type of entity to which the note belongs.\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* coupon -\n\nEntity that represents a coupon.\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n", "enum" : [ "coupon", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "Id of the mentioned entity type.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "note" : { "type" : "array", "description" : "Actual note.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "example" : null } }, "example" : null }, "line_item_addresses" : { "type" : "object", "deprecated" : false, "description" : "The list of addresses used for tax calculation on line items.\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "Line item reference\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "first_name" : { "type" : "array", "description" : "First name of the customer\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "last_name" : { "type" : "array", "description" : "Last name of the customer\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "email" : { "type" : "array", "description" : "Email address of the customer\n", "items" : { "type" : "string", "format" : "email", "deprecated" : false, "maxLength" : 70, "example" : null }, "example" : null }, "company" : { "type" : "array", "description" : "Name of the company\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "phone" : { "type" : "array", "description" : "Phone number of the customer\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "line1" : { "type" : "array", "description" : "Address line 1\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "line2" : { "type" : "array", "description" : "Address line 2\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "line3" : { "type" : "array", "description" : "Address line 3\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "city" : { "type" : "array", "description" : "Name of the city\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "state_code" : { "type" : "array", "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "state" : { "type" : "array", "description" : "State or Province\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "zip" : { "type" : "array", "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 20, "example" : null }, "example" : null }, "country" : { "type" : "array", "description" : "The billing address of the customer, specified as an [ISO 3166 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html).\nEntering an invalid code will return an error. \nIf [EU VAT](https://www.chargebee.com/docs/eu-vat.html) (2021 or later) or [Brexit configuration](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) is enabled, 'United Kingdom-Northern Ireland' is a valid option.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "validation_status" : { "type" : "array", "items" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "date", "id", "total" ], "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "credit_note" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "line_item_addresses" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/resume_dunning" : { "post" : { "summary" : "Resume dunning for invoice", "description" : "

Immediately resumes dunning for the specified invoice.

Prerequisites

This operation is only permitted for an invoice with a status of payment_due and for which dunning was previously paused.

", "operationId" : "resume_dunning_for_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 by the customer against the invoice specified. This operation is allowed only when all of the following conditions are true:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "tax_withheld" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_withheld\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The amount withheld by the customer as tax from the invoice. This must not exceed invoice.amount_due.\nThe unit depends on the type of currency.

\n", "minimum" : 1, "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date or time associated with this tax amount withheld. The default value is the time of invoking this operation.\n", "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "The description for this tax withheld.\n", "maxLength" : 65000, "example" : null } }, "required" : [ "amount" ], "example" : null } }, "example" : null }, "encoding" : { "tax_withheld" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]))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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 record from the invoice specified. This operation is allowed only when all of the following conditions are true:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "tax_withheld" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_withheld\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

An auto-generated unique identifier for the tax withheld. The value starts with the prefix tax_wh_.\nFor example, tax_wh_16BdDXSlbu4uV1Ee6\n.

", "maxLength" : 40, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "tax_withheld" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nor the payment_reference_number[number]\nto 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nAn unique identifier for the invoice serves that links the invoice to the corresponding payment reference number (PRN).\n**Note** :\nTo 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.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"old_inv_001\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "old_inv_001", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "payment_reference_number", "in" : "query", "description" : "Parameters for payment_reference_number\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "number" : { "type" : "object", "deprecated" : false, "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.\n", "example" : "001234", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "payment_reference_number" : { "$ref" : "#/components/schemas/PaymentReferenceNumber", "description" : "Resource object representing payment_reference_number" } }, "required" : [ "payment_reference_number" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Collects a specified amount of payment for an invoice, via a specified online payment method.

Offline payments

When there is no payment method available, and if you wish to record an offline payment, use the Record an offline payment API instead.

\n

Prerequisites & Constraints

\n

Impacts

Invoice

    \n
  • The invoice status changes to paid if the amount_due on the invoice becomes zero because of this payment. Otherwise, the status remains unchanged.
  • \n

Payment Schedules

If a payment_schedule exists for the invoice, then the status of the appropriate schedule_entries[].status is updated to paid.

\n

Related APIs

Record an offline payment

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Amount to be collected.

\n

Constraints

\n

Default value

", "minimum" : 1, "example" : null }, "authorization_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the transaction that is used to authorize the payment. (The transaction's type must be authorization.)

\n

Required if

\n

Prerequisites

\n

Constraints

", "maxLength" : 40, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of a valid payment_source associated with the customer.

\n

Required if

", "maxLength" : 40, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The initiator of this payment request. Sending this information can improve the success rate of the payment at the gateway.\n\\* merchant -\n\nThe payment was initiated by you (the merchant).\n\\* customer -\n\nThe payment was initiated by your customer.\n", "enum" : [ "customer", "merchant" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "invoice", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 for metered line_items of an invoice to reflect the latest usage data.\nNote: This operation is done automatically while closing the invoice.

", "operationId" : "sync_usages", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 online payments or online refundable credit notes applied to an invoice.

If multiple transactions or credit note allocations are associated with the invoice, the refund can be processed only for one transaction or allocation at a time. The refund amount is returned to the customer through the payment_source associated with the transaction.

For recording offline refunds, including those for linked_taxes_withheld, use the Record refund for an invoice API.

\n

Prerequisites & Constraints

\n

Impacts

Invoice
    \n
  • The invoice status does not change after this operation.
  • \n
Credit note
    \n
  • A refundable credit note is created for the invoice to capture the refund details.
  • \n
\n

Implementation Notes

Before calling this API, ensure the following:

\n

Related APIs

Record refund for an invoice

", "operationId" : "refund_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[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,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "refund_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The amount to be refunded.

\n

Constraints

\n

Default behavior

", "minimum" : 1, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Comment, if any, on the refund.\n", "maxLength" : 300, "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "The Customer Notes to be filled in the Credit Notes created to capture this refund detail.\n", "maxLength" : 2000, "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "reason_code" : { "type" : "string", "deprecated" : false, "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-object#create_reason_code)\nparameter instead\\]\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n\\* waiver -\n\nWaiver\n\\* order_cancellation -\n\nOrder Cancellation\n\\* order_change -\n\nOrder Change\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n", "enum" : [ "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other" ], "example" : null }, "create_reason_code" : { "type" : "string", "deprecated" : false, "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\n", "maxLength" : 100, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "invoice", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Record a full or partial offline refund for an invoice.

Use this API to record refunds processed outside Chargebee (for example, directly through a payment gateway or via offline methods such as bank transfers or checks) so you can reconcile them in Chargebee.

Important: This API does not process actual refunds for online payments or return money to customers through the payment gateway. To process refunds for online payments and return money to customers, use the Refund an invoice API instead.

\n

Prerequisites & Constraints

The invoice must have a refundable amount. (See Implementation Notes for details.)

\n

Impacts

Credit note

Chargebee creates a refundable credit note with status set to refunded.

Transactions

Chargebee records the refunds by creating transactions of type refund and links them to the credit note. The refund transactions are recorded in the following order:

    \n
  1. linked_payments for offline transactions. This is recorded as linked_refunds[] in the credit note.
  2. \n
  3. linked_taxes_withheld (if available). This is recorded as linked_tax_withheld_refunds[] in the credit note.
  4. \n
  5. linked_payments for online transactions (after offline payments and taxes withheld are exhausted). This is recorded as linked_refunds[] in the credit note.
  6. \n

Example

Consider an invoice with the following payments and tax withheld:

    \n
  • Offline payments: $30
  • \n
  • Online payments: $20
  • \n
  • Tax withheld: $5
  • \n

When you record a refund of $40, Chargebee allocates the refund as follows:

    \n
  • Refund against offline payments: $30
  • \n
  • Refund against tax withheld: $5
  • \n
  • Refund against online payments: $5
  • \n
\n

Implementation Notes

Before calling this API, perform the following checks:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the refund.\n", "maxLength" : 65000, "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "The Customer Notes to be filled in the Credit Notes created to capture this refund detail.\n", "maxLength" : 2000, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.

\n

Note:\nAny linked_taxes_withheld\nassociated with the invoice can also be recorded as refunded via this operation.

", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "

The payment method of this transaction

\n* cash -

Cash

\n* other -

Payment Methods other than the above types

\n* custom -

Custom

\n* check -

Check

\n* bank_transfer -

Bank Transfer

\n* chargeback -

Only applicable for a transaction of type\n= refund.\nThis value is set by Chargebee when an automated chargeback\noccurs. You can also set this explicitly when recording a refund\n.

", "enum" : [ "cash", "check", "chargeback", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "

The reference number for this transaction. For example, the check number when payment_method\n= check\n.

", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null } }, "required" : [ "date", "payment_method" ], "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "reason_code" : { "type" : "string", "deprecated" : false, "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-object#create_reason_code)\nparameter instead\\]\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n\\* chargeback -\n\nCan be set when you are recording your customer Chargebacks\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n\\* waiver -\n\nWaiver\n\\* order_cancellation -\n\nOrder Cancellation\n\\* order_change -\n\nOrder Change\n", "enum" : [ "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other" ], "example" : null }, "create_reason_code" : { "type" : "string", "deprecated" : false, "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\n", "maxLength" : 100, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true }, "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\n#### Related Tutorial\n\n* [Check out customer portal tutorial on how to download invoice as PDF.](https://www.chargebee.com/tutorials/customer-portal-sample.html#downloading_invoices_as_pdf)\n", "operationId" : "retrieve_invoice_as_pdf", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "disposition_type" : { "type" : "string", "default" : "attachment", "deprecated" : false, "description" : "Determines the pdf should be rendered as inline or attachment in the browser.\n\\* attachment -\n\nPDF is rendered as attachment in the browser\n\\* inline -\n\nPDF is rendered as inline in the browser\n", "enum" : [ "attachment", "inline" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "download" : { "$ref" : "#/components/schemas/Download", "description" : "

Resource object representing download

" } }, "required" : [ "download" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Note

", "operationId" : "download_e-invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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|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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "downloads" : { "type" : "array", "description" : "

Resource object representing download

", "items" : { "$ref" : "#/components/schemas/Download", "description" : "Resource object representing download" }, "example" : null } }, "required" : [ "downloads" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Records a refund for a refundable credit note.

This API does not process an actual refund for online payments by returning money to customers.

Use this API to record refunds processed outside Chargebee (for example, directly through a payment gateway or via offline methods such as bank transfers or checks) so you can reconcile them in Chargebee.

To process refunds via Chargebee for online payments and automatically return money to customers, use the Refund a credit note API instead.

\n

Prerequisites & Constraints

\n

Impacts

Transactions

Chargebee records the refunds by creating transactions of type refund and links them to the credit note. The refund transactions are recorded in the following order:

    \n
  1. linked_payments of the invoice associated with the credit note. This is recorded as linked_refunds[] in the credit note.
  2. \n
  3. linked_taxes_withheld (if available). This is recorded as linked_tax_withheld_refunds[] in the credit note.
  4. \n
\n

Implementation Notes

Before using this API, ensure:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "refund_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the refund.\n", "maxLength" : 300, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The payment transaction ID.\n", "maxLength" : 40, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The amount to be recorded as refunded. If not specified, the entire refundable amount\nfor this credit_note\nis assumed.

", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "

The payment method of this transaction

\n* cash -

Cash

\n* other -

Payment Methods other than the above types

\n* custom -

Custom

\n* check -

Check

\n* bank_transfer -

Bank Transfer

\n* chargeback -

Only applicable for a transaction of type\n= refund.\nThis value is set by Chargebee when an automated chargeback\noccurs. You can also set this explicitly when recording a refund\n.

", "enum" : [ "cash", "check", "chargeback", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "

The reference number for this transaction. For example, the check number when payment_method\n= check\n.

", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null } }, "required" : [ "date", "payment_method" ], "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Imports a credit note into Chargebee Billing. This endpoint allows you to import a credit note from external systems, such as accounting software, into Chargebee.

Use this operation during data migration or reconciliation to ensure historical credits are represented in the system. The credit note is linked to a reference invoice and can be allocated to other invoices or recorded as refunded to the customer.

\n

Impacts

Credit Note

The credit note's billing_address, shipping_address, and vat_number are copied from the reference invoice.

Invoices

Reference invoice
Other invoices
    \n
  • If allocations[] are provided, then for each allocated invoice:\n
      \n
    • the invoice's amount_due decreases by the allocated amount
    • \n
    • the invoice status changes to paid if the amount_due becomes zero
    • \n
    • an applied credit record is created to track the allocation.
    • \n
    \n
  • \n

Transactions

If linked_refunds[] are provided, then for each refund provided, a transaction of type refund is created with status set to success.

", "operationId" : "import_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier for the credit note (credit note number). \n**Constraints**\n\n* Must not conflict with existing credit note numbers in your Chargebee Billing site.\n* Must not conflict with future credit note numbers that your Chargebee Billing site may [generate](https://www.chargebee.com/docs/billing/2.0/invoices-credit-notes-and-quotes/invoice-numbering).\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the customer for whom the credit note is created.

\n

Required if

\n

Constraints

", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the subscription for which this credit note is created.

\n

Required if

\n

Constraints

", "maxLength" : 50, "example" : null }, "reference_invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the invoice against which this credit note is issued. The invoice must already exist in your Chargebee Billing site.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The credit note type. Determines how the credit note can be used. Learn more about credit note types.

\n* refundable -

Refundable credit note.

\n* store -

Store credit note.

\n

Constraints

\n* adjustment -

Adjustment credit note.

", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The currency code (ISO 4217 format) for the credit note.

\n

Required if

", "maxLength" : 3, "example" : null }, "create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "The [reason code](https://www.chargebee.com/docs/billing/2.0/site-configuration/reason-codes#managing-reason-codes-for-credit-notes) for creating the credit note. \n**Required if**\n\n* Reason codes are mandatory in Chargebee Billing. \n**Constraints**\n\n* Must be a valid and enabled reason code from the list configured in Chargebee Billing.\n* The reason code can also be from **Refund Credit Note** reason codes.\n* The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date when the credit note was issued.

\n

Constraints

", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of the credit note. Determines the current state of the credit note and how it can be used.

\n

Default value

\n* refund_due -

The credits are yet to be used or have been partially used.

\n

Constraints

\n* refunded -

The entire credit note amount has been used (either allocated to invoices or refunded).

\n

Constraints

\n* voided -

The credit note has been cancelled.

\n

Constraints

\n* adjusted -

The credit note has been adjusted against an invoice.

\n

Constraints

", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The total amount of the credit note.

\n

Constraints

", "minimum" : 0, "example" : null }, "refunded_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The timestamp when this credit note was fully used (refunded or allocated). This field is automatically set when the credit note status becomes refunded or adjusted.

", "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The timestamp indicating when this credit note was voided.

\n

Constraints

\n

Default value

", "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The credit note sub-total (total before round-off, fractional correction, and taxes).\n", "minimum" : 0, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The rounded-off amount for the credit note. For example, if the credit note amount is $99.99 and it is rounded off to $100.00, then $0.01 is the round_off_amount.

\n

Constraints

", "maximum" : 99, "minimum" : -99, "example" : null }, "fractional_correction" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the fractional correction amount.\n", "maximum" : 50000, "minimum" : -50000, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line items. At least one line item is required.\n", "properties" : { "reference_line_item_id" : { "type" : "array", "description" : "

The unique identifier of the line item from the reference invoice that this credit note line item reverses.

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "id" : { "type" : "array", "description" : "The unique identifier for this line item.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "Start date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "End date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "subscription_id" : { "type" : "array", "description" : "

The unique identifier of the subscription this line item belongs to.

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this line item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "

The unit amount of the line item.

\n

Required if

\n

Constraints

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "

The quantity of the line item.

\n

Required if

\n

Constraints

", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "

The total amount of this line item.

\n

Required if

\n

Constraints

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "amount_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount1_entity_id" : { "type" : "array", "description" : "First item level discount entity id\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount1_amount" : { "type" : "array", "description" : "First item level discount amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "item_level_discount2_entity_id" : { "type" : "array", "description" : "Second item level discount entity id\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount2_amount" : { "type" : "array", "description" : "Second item level discount amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax1_name" : { "type" : "array", "description" : "

First tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax1_amount" : { "type" : "array", "description" : "

First tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax2_name" : { "type" : "array", "description" : "

Second tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax2_amount" : { "type" : "array", "description" : "

Second tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax3_name" : { "type" : "array", "description" : "

Third tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax3_amount" : { "type" : "array", "description" : "

Third tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax4_name" : { "type" : "array", "description" : "

Fourth tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax4_amount" : { "type" : "array", "description" : "

Fourth tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax5_name" : { "type" : "array", "description" : "

Fifth tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax5_amount" : { "type" : "array", "description" : "

Fifth tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax6_name" : { "type" : "array", "description" : "

Sixth tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax6_amount" : { "type" : "array", "description" : "

Sixth tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax7_name" : { "type" : "array", "description" : "

Seventh tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax7_amount" : { "type" : "array", "description" : "

Seventh tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax8_name" : { "type" : "array", "description" : "

Eighth tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax8_amount" : { "type" : "array", "description" : "

Eighth tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax9_name" : { "type" : "array", "description" : "

Ninth tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax9_amount" : { "type" : "array", "description" : "

Ninth tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax10_name" : { "type" : "array", "description" : "

Tenth tax name.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax10_amount" : { "type" : "array", "description" : "

Tenth tax amount.

\n

Required if

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "proration_mode" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null }, "example" : null } }, "required" : [ "description" ], "example" : null }, "line_item_tiers" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for line item tiers. Used to specify tiered pricing details for line items with tiered, volume, or stairstep pricing models.

", "properties" : { "line_item_id" : { "type" : "array", "description" : "The unique identifier of the line item this tier belongs to.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of the unit range for this tier. Not applicable for the highest tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "quantity_used" : { "type" : "array", "description" : "The number of units purchased within this tier range.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "quantity_used_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null } }, "required" : [ "line_item_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts. Used to specify discounts, coupons, or promotional credits applied to the credit note at the document level or item level.\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "

The unique identifier of the line item that this deduction is for. This must match the line_items[id] of the line item to which the discount is applied.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied. Determines whether the discount is applied at the document level or item level, and whether it's a coupon, discount, or promotional credit.

\n* document_level_coupon -

The deduction is due to a coupon applied at the document level.

\n

Constraints

\n* item_level_coupon -

The deduction is due to a coupon applied at the line item level.

\n

Constraints

\n* item_level_discount -

The deduction is due to a discount applied at the line item level.

\n

Constraints

\n\n* promotional_credits -

The deduction is due to a promotional credit applied.

\n

Constraints

\n* document_level_discount -

The deduction is due to a discount applied at the document level.

\n

Constraints

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "

The unique identifier of the coupon.

\n

Required if

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this deduction.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "taxes" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for document-level taxes. Used to specify tax information at the credit note level.

\n

Prerequisite

", "properties" : { "name" : { "type" : "array", "description" : "

The name of the tax applied.

\n

Constraints

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "rate" : { "type" : "array", "description" : "

The rate of tax.

\n

Note

", "items" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "

The total tax amount for this credit note.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description of tax\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "juris_type" : { "type" : "array", "items" : { "type" : "string", "default" : "other", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* country -\n\nThe tax jurisdiction is a country\n\\* special -\n\nSpecial tax jurisdiction.\n\\* county -\n\nThe tax jurisdiction is a county\n\\* state -\n\nThe tax jurisdiction is a state\n\\* city -\n\nThe tax jurisdiction is a city\n\\* other -\n\nJurisdictions other than the ones listed above.\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* federal -\n\nThe tax jurisdiction is a federal\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "example" : null }, "juris_name" : { "type" : "array", "description" : "The name of the tax jurisdiction\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "juris_code" : { "type" : "array", "description" : "The tax jurisdiction code\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null } }, "required" : [ "name", "rate" ], "example" : null }, "allocations" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for credit allocations. Used to specify how the credit note amount is allocated to invoices.

\n

Required if

\n

Constraints

", "properties" : { "invoice_id" : { "type" : "array", "description" : "The unique identifier of the invoice to which this credit note amount is allocated. The invoice must already exist in Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "allocated_amount" : { "type" : "array", "description" : "

The amount allocated from this credit note to the specified invoice.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "allocated_at" : { "type" : "array", "description" : "

The timestamp when the allocation occurred.

\n

Constraints

\n

Default value

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "allocated_amount", "allocated_at", "invoice_id" ], "example" : null }, "linked_refunds" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for linked refunds. Used to record refund transactions associated with this credit note.

\n

Required if

\n

Constraints

", "properties" : { "id" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "

The amount of this refund transaction.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "payment_method" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "The payment method used for the refund.\n\\* other -\n\nPayment Methods other than the above types\n\\* cash -\n\nCash\n\\* custom -\n\nCustom\n\\* bank_transfer -\n\nBank Transfer\n\\* check -\n\nCheck\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "example" : null }, "date" : { "type" : "array", "description" : "The date when the refund occurred. \n**Constraints**\n\n* Must be a date in the past.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "reference_number" : { "type" : "array", "description" : "Reference number for this refund.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "minLength" : 1, "example" : null }, "example" : null } }, "required" : [ "amount", "date", "payment_method" ], "example" : null } }, "required" : [ "create_reason_code", "date", "id", "reference_invoice_id", "type" ], "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "delete_a_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "disposition_type" : { "type" : "string", "default" : "attachment", "deprecated" : false, "description" : "Determines the pdf should be rendered as inline or attachment in the browser.\n\\* attachment -\n\nPDF is rendered as attachment in the browser\n\\* inline -\n\nPDF is rendered as inline in the browser\n", "enum" : [ "attachment", "inline" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "download" : { "$ref" : "#/components/schemas/Download", "description" : "

Resource object representing download

" } }, "required" : [ "download" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\nTo support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually.\nThis endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Void or invalidate the specified credit note.

Use this operation for incorrectly generated credit notes, such as those with wrong details or created by mistake. This is a preferred method over deleting the credit note, as it preserves the audit trail, allowing for future reference and compliance without removing the original record.

\n

Prerequisites & Constraints

See Implementation Notes for more details.

\n

Impacts

Invoices

If the credit note type is adjustment, the associated invoice status changes to not_paid, and the amount_due on the invoice increases by the amount that was allocated via the credit note.

\n

Implementation Notes

Before calling this API, ensure the following:

\n

Related APIs

Delete a 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 specified amount from a refundable credit note back to the customer's payment source.

This operation supports only refunds against online payments. The refund amount is returned to the customer through the payment_source associated with the transaction. If multiple transactions are associated with the credit note, call this API once for each transaction.

To record offline refunds, including those for linked_taxes_withheld, use the Record refund for a credit note API.

\n

Prerequisites & Constraints

\n

Impacts

Credit note

    \n
  • The credit note's amount_available is reduced by the refunded amount.
  • \n
  • The credit note's status is updated to refunded if the refunded amount is equal to the credit note's amount_available.
  • \n
  • The credit note's linked_refunds is updated with the details of the refund transaction.
  • \n

Transaction

Chargebee creates a transaction of type refund and links it to the credit note under credit_note.linked_refunds.

\n

Implementation Notes

Before you call this API, make sure the following conditions are met:

", "operationId" : "refund_a_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "refund_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The amount to be refunded.

\n

Constraints

\n

Default behavior

", "minimum" : 1, "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "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](/docs/api/credit_notes/retrieve-credit-note-as-pdf)\n.\n", "maxLength" : 2000, "example" : null }, "refund_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "credit_note", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_credit_notes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:(?: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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nCredit-note id.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"CN_123\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "CN_123", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nThe identifier of the customer this Credit Note belongs to.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"4gmiXbsjdm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on subscription_id.\nNOTE: Not to be used if *consolidated invoicing*\nfeature is enabled.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"4gmiXbsjdm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "reference_invoice_id", "in" : "query", "description" : "optional, string filter\n\nThe identifier of the invoice against which this Credit Note is issued.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*reference_invoice_id\\[is\\] = \"INVOICE_876\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "INVOICE_876", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe credit note type. Possible values are : adjustment, refundable.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is_not\\] = \"adjustment\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "adjustment", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`adjustment\\` - Adjustment Credit Note \\* \\`refundable\\` - Refundable Credit Note \\* \\`store\\` - Store Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`adjustment\\` - Adjustment Credit Note \\* \\`refundable\\` - Refundable Credit Note \\* \\`store\\` - Store Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`adjustment\\` - Adjustment Credit Note \\* \\`refundable\\` - Refundable Credit Note \\* \\`store\\` - Store Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "pattern" : "^\\[(adjustment|refundable|store)(,(adjustment|refundable|store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`adjustment\\` - Adjustment Credit Note \\* \\`refundable\\` - Refundable Credit Note \\* \\`store\\` - Store Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "pattern" : "^\\[(adjustment|refundable|store)(,(adjustment|refundable|store))*\\]$", "example" : null } } } }, { "name" : "reason_code", "in" : "query", "description" : "optional, enumerated string filter\n\nThe 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-object#create_reason_code)\nparameter instead\\]. Possible values are : write_off, subscription_change, subscription_cancellation, subscription_pause, chargeback, product_unsatisfactory, service_unsatisfactory, order_change, order_cancellation, waiver, other, fraudulent.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*reason_code\\[is\\] = \"waiver\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "waiver", "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\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "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\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "in" : { "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\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "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))*\\]$", "example" : null } } } }, { "name" : "create_reason_code", "in" : "query", "description" : "optional, string filter\n\nReason 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** .\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*create_reason_code\\[is\\] = \"Other\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Other", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe credit note status. Possible values are : adjusted, refunded, refund_due, voided.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"adjusted\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "adjusted", "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.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "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.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "in" : { "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.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "pattern" : "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "pattern" : "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\]$", "example" : null } } } }, { "name" : "date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe date the Credit Note is issued.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*date\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "total", "in" : "query", "description" : "optional, in cents filter\n\nCredit Note amount in cents.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*total\\[is\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "price_type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe price type of the Credit Note. Possible values are : tax_exclusive, tax_inclusive.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*price_type\\[is_not\\] = \"tax_exclusive\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "tax_exclusive", "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } } }, { "name" : "amount_allocated", "in" : "query", "description" : "optional, in cents filter\n\nThe amount allocated to the invoices.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_allocated\\[is\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_refunded", "in" : "query", "description" : "optional, in cents filter\n\nThe refunds issued from this Credit Note.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_refunded\\[lte\\] = \"130\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "130", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_available", "in" : "query", "description" : "optional, in cents filter\n\nThe yet to be used credits of this Credit Note.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_available\\[gt\\] = \"1400\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1400", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "voided_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating the date and time this Credit Note gets voided.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*voided_at\\[before\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date" ], "example" : null } }, "example" : null } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "einvoice", "in" : "query", "description" : "Parameters for einvoice\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "status" : { "type" : "object", "deprecated" : false, "description" : "

The status of processing the e-invoice. To obtain detailed information about the current status\n, see message\n.

", "example" : "failed", "properties" : { "is" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `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.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `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.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "in" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `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.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "pattern" : "^\\[(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid)(,(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `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.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "pattern" : "^\\[(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid)(,(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid))*\\]$", "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" } }, "required" : [ "credit_note" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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

Impacts

Invoice

Credit note

    \n
  • A new credit note of the specified type is created.
  • \n
  • If the credit note type is adjustment:\n
      \n
    • total and amount_allocated are set to the adjusted amount.
    • \n
    • status is set to adjusted.
    • \n
    \n
  • \n
  • If the credit note type is refundable or store:\n
      \n
    • total and amount_available are set to the refundable amount.
    • \n
    • status is set to refund_due.
    • \n
    \n
  • \n
  • The taxes[].amount and line_item_taxes[].tax_amount are set to the corresponding values on the invoice, prorated by the ratio of credit_note.total to invoice.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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|(?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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "reference_invoice_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the invoice against which this credit note is issued.

\n

Required when

\n

Note\nWhen not provided and type is refundable, then customer_id must be provided because this creates a standalone credit note.

", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the customer for whom this credit note is issued.

\n

Required when

", "maxLength" : 50, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The total credit note amount.

\n

Constraints

", "minimum" : 0, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of credit note to create.

\n

Prerequisites

\n* refundable -

Creates a refundable credit note.

\n

Prerequisites

\n* store -

Creates a store credit note.

\n

Prerequisites

\n* adjustment -

Creates an adjustment credit note.

\n

Prerequisites

", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "reason_code" : { "type" : "string", "deprecated" : false, "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-object#create_reason_code)\nparameter instead\\].\n\\* waiver -\n\nWaiver\n\\* order_cancellation -\n\nOrder Cancellation\n\\* order_change -\n\nOrder Change\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n", "enum" : [ "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other" ], "example" : null }, "create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for creating the credit note. \n**Constraints**\n\n* Must be one of the case-sensitive [reason codes](https://www.chargebee.com/docs/billing/2.0/site-configuration/reason-codes#managing-reason-codes-for-credit-notes) set in Chargebee Billing. \n**Required when**\n\n* Reason codes are configured as mandatory on the site.\n", "maxLength" : 100, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date on which the credit note is issued.

\n

Constraints

", "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "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](/docs/api/credit_notes/retrieve-credit-note-as-pdf)\n.\n", "maxLength" : 2000, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the credit note. It is required for a standalone credit note if Multicurrency is enabled.\n", "maxLength" : 3, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Credit Note PDF](/docs/api/credit_notes/retrieve-credit-note-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_items\n", "properties" : { "reference_line_item_id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "Unit amount of the line item. Required for FLAT_FEE, PER_UNIT and VOLUME pricing model.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Applicable for the line_item when the pricing_model\nis flat_fee\n, per_unit\nor volume.\nCan be provided only when multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the line item. Required for PER_UNIT and VOLUME pricing model.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity of the line_item.\nApplicable for the line_item\nwhen the pricing_model\nis per_unit\nand volume.\nCan be provided only when multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Amount of the line item. Applicable only for STAIRSTEP, TIERED pricing_model.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "Start date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "End date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for the line item.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "\n* addon_item_price -

Indicates that this line item is based on an addon item price.

\n* charge_item_price -

Indicates that this line item is based on a charge item price.

\n* adhoc -

Indicates that this line item is not modelled; that is, it was created ad hoc. The entity_id attribute is null in this case.

\n* plan_item_price -

Indicates that this line item is based on a plan item price.

", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "type" ], "example" : null }, "encoding" : { "line_items" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/update" : { "post" : { "summary" : "Update Credit Note Details", "description" : "

Updates the custom fields and comment of a credit note.

Use this operation to add or change custom field values, or to attach an internal comment, without modifying other credit note attributes. Pass at least one credit note custom field or comment; otherwise the credit note is returned unchanged.

\n

Impacts

Credit note

    \n
  • Updates any credit note custom fields included in the request. Existing custom field values that you omit from the request are left unchanged.
  • \n
  • Adds an internal comment when you pass comment.
  • \n
", "operationId" : "update_credit_note_details", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Credit Note PDF](/docs/api/credit_notes/retrieve-credit-note-as-pdf)\n.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Note

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "downloads" : { "type" : "array", "description" : "

Resource object representing download

", "items" : { "$ref" : "#/components/schemas/Download", "description" : "Resource object representing download" }, "example" : null } }, "required" : [ "downloads" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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}(?:(?: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nrecord from the credit_note\n.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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])))))))|(?:(?:(?:(?:(?:(?:[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "tax_withheld" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_withheld\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

An auto-generated unique identifier for the tax withheld. The value starts with the prefix tax_wh_.\nFor example, tax_wh_16BdDXSlbu4uV1Ee6\n.

", "maxLength" : 40, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "tax_withheld" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_credit_note", "parameters" : [ { "name" : "line_items_limit", "in" : "query", "description" : "Specify the maximum number of line items to include in the response. \n**Note:**\n\n* Applicable only when Enterprise-scale Invoicing is enabled.\n* Enterprise-scale Invoicing is currently in **Private Beta** . Please reach out to [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 100, "deprecated" : false, "maximum" : 300, "minimum" : 1, "example" : null } }, { "name" : "line_items_offset", "in" : "query", "description" : "

Specify the starting point for retrieving line items. Use the value from the line_items_next_offset attribute of the previous retrieve API response.

\n

Note:

", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 1000, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-f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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "delete_an_unbilled_charge", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "unbilled-charge-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/unbilled-charge-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "unbilled_charge" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "

Resource object representing unbilled_charge

" } }, "required" : [ "unbilled_charge" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nIn the estimate response,\n\n* **estimate.invoice_estimates** is an array of **estimate.invoice_estimate**. This has the details of the invoices that will be generated now.\n\n**Note:**\n\n* This API when invoked does not perform the actual operation. It just generates an estimate.\n* Both *subscription_id* and *customer_id* parameters should not be given at the same time.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|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):){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this estimate needs to be created. Should be given if 'customer_id' is not specified.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nIf 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.\n\nDuring invoice creation, the PO number for the line items will be filled from the subscription's current PO number, if available.\n\nIf no recurring item is present in the created invoice, the invoice will be marked as recurring=false.\n\nIf consolidated invoicing is enabled and the parameter 'customer_id' is passed, multiple invoices can be created based on the following factors.\n\n* Currency\n* PO number if 'Group by PO number' is enabled\n* Shipping address\n* Auto Collection\n* Payment method\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "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. .\n", "maxLength" : 50, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoices" : { "type" : "array", "description" : "

Resource object representing invoice

", "items" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "example" : null } }, "required" : [ "invoices" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_unbilled_charges", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?:[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\* '.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nA unique identifier for the subscription this charge belongs to.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"5hjdk8nOpd0b12\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5hjdk8nOpd0b12", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nA unique identifier for the customer being charged.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"5hjdk8nOpd0b12\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5hjdk8nOpd0b12", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "unbilled_charge" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" } }, "required" : [ "unbilled_charge" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this unbilled charges needs to be created.\n", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the unbilled_charge.\n", "maxLength" : 3, "example" : null }, "item_prices" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_prices\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "A unique ID for your system to identify the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Item price quantity\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price or per-unit-price of the item price. By default, it is the value set\nfor the item_price.\nThis is only applicable when the pricing_model\nof the item_price\nis flat_fee\nor per_unit.\nThe value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the item starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the item ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price to which this tier belongs.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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 ).\nProvide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this charge\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "taxable" : { "type" : "array", "description" : "The amount to be charged is taxable or not.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "tax_profile_id" : { "type" : "array", "description" : "Tax profile of the charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "hsn_code" : { "type" : "array", "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* retail -\n\nTransaction is a sale to an end user\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the charge starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the charge ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "subscription_id" ], "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "unbilled_charges" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_orders", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\* '.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "exclude_deleted_credit_notes", "in" : "query", "description" : "Flag to indicate whether deleted credit notes should be passed or not.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "deprecated" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUniquely identifies the order. It is the api identifier for the order.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"890\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "890", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "invoice_id", "in" : "query", "description" : "optional, string filter\n\nThe invoice number which acts as an identifier for invoice and is generated sequentially.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*invoice_id\\[is\\] = \"INVOICE_982\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "INVOICE_982", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nThe subscription for which the order is created.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*subscription_id\\[is_not\\] = \"null\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe status of this order. Possible values are : new, processing, complete, cancelled, voided, queued, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"queued\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "queued", "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.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "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.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "in" : { "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.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "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))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "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))*\\]$", "example" : null } } } }, { "name" : "shipping_date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThis is the date on which the order will be delivered to the customer.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*shipping_date\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "shipped_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe time at which the order was shipped.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*shipped_at\\[before\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "order_type", "in" : "query", "description" : "optional, enumerated string filter\n\nOrder type. Possible values are : manual, system_generated.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*order_type\\[is_not\\] = \"system_generated\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "system_generated", "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.\n", "enum" : [ "manual", "system_generated" ], "example" : null }, "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.\n", "enum" : [ "manual", "system_generated" ], "example" : null }, "in" : { "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.\n", "enum" : [ "manual", "system_generated" ], "pattern" : "^\\[(manual|system_generated)(,(manual|system_generated))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "manual", "system_generated" ], "pattern" : "^\\[(manual|system_generated)(,(manual|system_generated))*\\]$", "example" : null } } } }, { "name" : "order_date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe date on which the order will start getting processed.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*order_date\\[before\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "paid_on", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe timestamp indicating the date \\& time the order's invoice got paid.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*paid_on\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at .\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe time at which the order was created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "resent_status", "in" : "query", "description" : "optional, enumerated string filter\n\nResent order status. Possible values are : fully_resent, partially_resent.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*resent_status\\[is\\] = \"fully_resent\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "fully_resent", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`fully_resent\\` - Order is Fully resent \\* \\`partially_resent\\` - Order is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`fully_resent\\` - Order is Fully resent \\* \\`partially_resent\\` - Order is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`fully_resent\\` - Order is Fully resent \\* \\`partially_resent\\` - Order is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "pattern" : "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`fully_resent\\` - Order is Fully resent \\* \\`partially_resent\\` - Order is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "pattern" : "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\]$", "example" : null } } } }, { "name" : "is_resent", "in" : "query", "description" : "optional, boolean filter\n\nOrder is resent order or not. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*is_resent\\[is\\] = \"false\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "false", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "original_order_id", "in" : "query", "description" : "optional, string filter\n\nIf resent order what is the parent order id.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*original_order_id\\[is\\] = \"1xRt6ifdr\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1xRt6ifdr", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order" } }, "required" : [ "order" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n\nChargebee no longer supports this endpoint, see [here](https://www.chargebee.com/docs/1.0/manual_orders_deprecate.html)\nfor more information. Contact [Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\nfor additional assistance or if you have concerns about this update.\n", "operationId" : "create_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the order. If not given, this will be auto-generated.\n", "maxLength" : 40, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The invoice number which acts as an identifier for invoice and is generated sequentially.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The order status.\n\\* cancelled -\n\nOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n\\* new -\n\nOrder has been created. Applicable only if you are using Chargebee's legacy order management system.\n\\* voided -\n\nOrder has been voided. Applicable only if you are using Chargebee's legacy order management system\n\\* complete -\n\nOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n\\* processing -\n\nOrder is being processed. Applicable only if you are using Chargebee's legacy order management system\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "fulfillment_status" : { "type" : "string", "deprecated" : false, "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", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "The custom note for the order.\n", "maxLength" : 600, "example" : null }, "tracking_id" : { "type" : "string", "deprecated" : false, "description" : "The tracking id of the order.\n", "maxLength" : 50, "example" : null }, "tracking_url" : { "type" : "string", "deprecated" : false, "description" : "The tracking url of the order.\n", "maxLength" : 255, "example" : null }, "batch_id" : { "type" : "string", "deprecated" : false, "description" : "Unique id to identify a group of orders.\n", "maxLength" : 50, "example" : null } }, "required" : [ "invoice_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "import_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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\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.\n", "maxLength" : 40, "example" : null }, "document_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The invoice number which acts as an identifier for invoice and is generated sequentially.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The status of this order.\n\\* shipped -\n\nThe order has moved from order management system to a shipping system.\n\\* queued -\n\nOrder is yet to be processed by any system, these are scheduled orders created by Chargebee\n\\* on_hold -\n\nThe order is paused from being processed.\n\\* returned -\n\nThe order has been returned after delivery.\n\\* delivered -\n\nThe order has been delivered to the customer.\n\\* awaiting_shipment -\n\nThe order has been picked up by an integration system, and synced to a shipping management platform\n\\* cancelled -\n\nOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n\\* partially_delivered -\n\nThe order has been partially delivered to the customer.\n", "enum" : [ "cancelled", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The subscription for which the order is created.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The customer for which the order is created.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was created.\n", "example" : null }, "order_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the order will start getting processed.\n", "example" : null }, "shipping_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "This is the date on which the order has to be shipped to the customer.\n", "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "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:\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.\n", "maxLength" : 50, "example" : null }, "fulfillment_status" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "The custom note for the order.\n", "maxLength" : 600, "example" : null }, "tracking_id" : { "type" : "string", "deprecated" : false, "description" : "The tracking id of the order.\n", "maxLength" : 50, "example" : null }, "tracking_url" : { "type" : "string", "deprecated" : false, "description" : "The tracking url of the order.\n", "maxLength" : 255, "example" : null }, "batch_id" : { "type" : "string", "deprecated" : false, "description" : "Unique id to identify a group of orders.\n", "maxLength" : 50, "example" : null }, "shipment_carrier" : { "type" : "string", "deprecated" : false, "description" : "Shipment carrier.\n", "maxLength" : 50, "example" : null }, "shipping_cut_off_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time after which an order becomes unservicable.\n", "example" : null }, "delivered_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was delivered.\n", "example" : null }, "shipped_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was shipped.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was cancelled.\n", "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "Cancellation reason.\n\\* shipping_cut_off_passed -\n\nThe invoice has been paid late and Chargebee cancel's the first order for the invoice.\n\\* invoice_voided -\n\nThe invoice for which the order was createed has been voided.\n\\* alternative_found -\n\nAlternative found.\n\\* others -\n\nOther reason\n\\* order_resent -\n\nOrder resent\n\\* product_unsatisfactory -\n\nProduct unsatisfactory.\n\\* delivery_date_missed -\n\nDelivery date missed.\n\\* subscription_cancelled -\n\nThe subsctiption for which the order was created has been cancelled.\n\\* fraudulent_transaction -\n\nFraudulent transaction.\n\\* invoice_written_off -\n\nThe invoice has been completely written off. Orders are generated by Chargebee in cancelled state.\n\\* product_not_required -\n\nProduct not required.\n\\* payment_declined -\n\nPayment declined.\n\\* product_not_available -\n\nProduct not available.\n\\* third_party_cancellation -\n\nThird party cancellation.\n", "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" ], "example" : null }, "refundable_credits_issued" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.\n", "minimum" : 0, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null } }, "required" : [ "created_at", "invoice_id", "order_date", "shipping_date", "status" ], "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "operationId" : "assign_order_number", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "resend_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "shipping_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the order should be shipped to the customer.\n", "example" : null }, "resend_reason" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "order_line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for order_line_items\n", "properties" : { "id" : { "type" : "array", "description" : "The identifier for the order line item.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "fulfillment_quantity" : { "type" : "array", "description" : "The quantity that is going to get fulfilled for this order\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "order_line_items" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "operationId" : "reopen_a_cancelled_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[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,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "void_cancellation_credit_notes" : { "type" : "boolean", "deprecated" : false, "description" : "Flag to void credit notes created for cancellation if they are unused.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "operationId" : "cancel_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][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})):){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "Cancellation reason.\n\\* shipping_cut_off_passed -\n\nThe invoice has been paid late and Chargebee cancel's the first order for the invoice.\n\\* alternative_found -\n\nAlternative found.\n\\* others -\n\nOther reason\n\\* product_unsatisfactory -\n\nProduct unsatisfactory.\n\\* product_not_required -\n\nProduct not required.\n\\* delivery_date_missed -\n\nDelivery date missed.\n\\* invoice_voided -\n\nThe invoice for which the order was createed has been voided.\n\\* payment_declined -\n\nPayment declined.\n\\* product_not_available -\n\nProduct not available.\n\\* subscription_cancelled -\n\nThe subsctiption for which the order was created has been cancelled.\n\\* third_party_cancellation -\n\nThird party cancellation.\n\\* fraudulent_transaction -\n\nFraudulent transaction.\n\\* order_resent -\n\nOrder resent\n\\* invoice_written_off -\n\nThe invoice has been completely written off. Orders are generated by Chargebee in cancelled state.\n", "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" ], "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "The Customer Notes to be filled in the Credit Notes created to capture this refund detail.\n", "maxLength" : 2000, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Comment, if any, on the refund.\n", "maxLength" : 300, "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was cancelled.\n", "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Credit Note amount in cents.\n", "minimum" : 0, "example" : null } }, "example" : null } }, "required" : [ "cancellation_reason" ], "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Reference id is the unique identifier of the order in the shipping/order management application.\n", "maxLength" : 50, "example" : null }, "batch_id" : { "type" : "string", "deprecated" : false, "description" : "Unique id to identify a group of orders.\n", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "The custom note for the order.\n", "maxLength" : 600, "example" : null }, "shipping_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the order should be shipped to the customer.\n", "example" : null }, "order_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The order date.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was cancelled.\n", "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "Cancellation reason.\n\\* shipping_cut_off_passed -\n\nThe invoice has been paid late and Chargebee cancel's the first order for the invoice.\n\\* invoice_voided -\n\nThe invoice for which the order was createed has been voided.\n\\* alternative_found -\n\nAlternative found.\n\\* others -\n\nOther reason\n\\* order_resent -\n\nOrder resent\n\\* product_unsatisfactory -\n\nProduct unsatisfactory.\n\\* delivery_date_missed -\n\nDelivery date missed.\n\\* subscription_cancelled -\n\nThe subsctiption for which the order was created has been cancelled.\n\\* fraudulent_transaction -\n\nFraudulent transaction.\n\\* invoice_written_off -\n\nThe invoice has been completely written off. Orders are generated by Chargebee in cancelled state.\n\\* product_not_required -\n\nProduct not required.\n\\* payment_declined -\n\nPayment declined.\n\\* product_not_available -\n\nProduct not available.\n\\* third_party_cancellation -\n\nThird party cancellation.\n", "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" ], "example" : null }, "shipped_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was shipped.\n", "example" : null }, "delivered_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was delivered.\n", "example" : null }, "tracking_url" : { "type" : "string", "deprecated" : false, "description" : "The tracking url of the order.\n", "maxLength" : 255, "example" : null }, "tracking_id" : { "type" : "string", "deprecated" : false, "description" : "The tracking id of the order.\n", "maxLength" : 50, "example" : null }, "shipment_carrier" : { "type" : "string", "deprecated" : false, "description" : "The carrier used to ship the goods to the customer. Ex:- FedEx.\n", "maxLength" : 50, "example" : null }, "fulfillment_status" : { "type" : "string", "deprecated" : false, "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", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "new", "deprecated" : false, "description" : "The order status.\n\\* voided -\n\nOrder has been voided. Applicable only if you are using Chargebee's legacy order management system\n\\* complete -\n\nOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n\\* shipped -\n\nThe order has moved from order management system to a shipping system.\n\\* processing -\n\nOrder is being processed. Applicable only if you are using Chargebee's legacy order management system\n\\* queued -\n\nOrder is yet to be processed by any system, these are scheduled orders created by Chargebee\n\\* on_hold -\n\nThe order is paused from being processed.\n\\* new -\n\nOrder has been created. Applicable only if you are using Chargebee's legacy order management system.\n\\* returned -\n\nThe order has been returned after delivery.\n\\* delivered -\n\nThe order has been delivered to the customer.\n\\* awaiting_shipment -\n\nThe order has been picked up by an integration system, and synced to a shipping management platform\n\\* cancelled -\n\nOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n\\* partially_delivered -\n\nThe order has been partially delivered to the customer.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "order_line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for order_line_items\n", "properties" : { "id" : { "type" : "array", "description" : "The identifier for the order line item.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "status" : { "type" : "array", "items" : { "type" : "string", "default" : "queued", "deprecated" : false, "description" : "The order line item's delivery status\n\\* shipped -\n\nThe order line item has been shipped.\n\\* returned -\n\nThe order has been returned after delivery.\n\\* queued -\n\nNot processed for shipping yet.\n\\* awaiting_shipment -\n\nMoved to shipping platform.\n\\* on_hold -\n\nThe delivery has been moved to \"On hold\" status.\n\\* partially_delivered -\n\nThe order has been partially delivered to the customer.\n\\* cancelled -\n\nThe order has been returned after delivery.\n\\* delivered -\n\nThe order line item has been delivered.\n", "enum" : [ "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned", "cancelled" ], "example" : null }, "example" : null }, "sku" : { "type" : "array", "description" : "The SKU code for the order line item product\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "order_line_items" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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](/docs/api/orders/import-an-order)\n.Delete does not happen if the order was refunded. It goes through if order refund was initiated and is in \"refund_due\" state.\n", "operationId" : "delete_an_imported_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "The Customer Notes to be filled in the Credit Notes created to capture this refund detail.\n", "maxLength" : 2000, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Comment, if any, on the refund.\n", "maxLength" : 300, "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "reason_code" : { "type" : "string", "deprecated" : false, "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-object#create_reason_code)\nparameter instead\\]\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n\\* chargeback -\n\nCan be set when you are recording your customer Chargebacks\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n\\* write_off -\n\nThis reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off)\noperation.\n\\* subscription_change -\n\nThis reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html)\nis enabled\n\\* fraudulent -\n\nFRAUDULENT\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n\\* subscription_pause -\n\nThis reason will be automatically set to credit notes created during pause/resume subscription operation.\n\\* waiver -\n\nWaiver\n\\* order_cancellation -\n\nOrder Cancellation\n\\* order_change -\n\nOrder Change\n\\* subscription_cancellation -\n\nThis reason will be set automatically for Credit Notes created during cancel subscription operation\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Credit Note amount in cents.\n", "minimum" : 0, "example" : null } }, "required" : [ "reason_code", "total" ], "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "

Resource object representing order

" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately.\n", "example" : null }, "auto_claim" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

When true\n, the claim happens automatically. When not passed, the default value in the site settings is used.

", "example" : null }, "no_expiry" : { "type" : "boolean", "deprecated" : false, "description" : "

When true\n, indicates that the gift does not expire. Do not pass or pass as false\nwhen auto_claim\nis set.\n.

", "example" : null }, "claim_expiry_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date until which the gift can be claimed. Must be set to a value after scheduled_at.\nIf the gift is not claimed within claim_expiry_date\n, it will expire and the subscription will move to cancelled\nstate. When not passed, the value specified in the site settings will be used.\nPass as NULL\nor do not pass when auto_claim\nor no_expiry\nare set.

", "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A \\[collection of key-value pairs\\](/docs/api/advanced-features) that provides extra information about the subscription. \\*\\*Constraints\\*\\* \\* Character limit: 65,535.\n", "example" : null }, "gifter" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gifter\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Gifter customer id.\n", "maxLength" : 50, "example" : null }, "signature" : { "type" : "string", "deprecated" : false, "description" : "Gifter sign-off name\n", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "Personalized message for the gift.\n", "maxLength" : 500, "example" : null }, "payment_src_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the payment source\n", "maxLength" : 40, "example" : null } }, "required" : [ "customer_id", "signature" ], "example" : null }, "gift_receiver" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift_receiver\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Receiver customer id.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the receiver as given by the gifter.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the receiver as given by the gifter,\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the receiver. All gift related emails are sent to this email.\n", "maxLength" : 70, "example" : null } }, "required" : [ "customer_id", "email", "first_name", "last_name" ], "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "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.\n\\* card -\n\ncard\n\\* twint -\n\nPayments made via Twint\n\\* swish -\n\nPayments made via Swish\n\\* dotpay -\n\ndotpay\n\\* faster_payments -\n\nFaster Payments\n\\* upi -\n\nupi\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* klarna -\n\nPayments made via Klarna.\n\\* payme -\n\nPayments made via PayMe\n\\* go_pay -\n\nPayments made via GoPay\n\\* google_pay -\n\ngoogle_pay\n\\* trustly -\n\nTrustly\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* pix -\n\nPix\n\\* venmo -\n\nVenmo\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* alipay -\n\nPayments made via Alipay.\n\\* tamara -\n\nPayments made via Tamara.\n\\* ideal -\n\nideal\n\\* pay_to -\n\nPayTo\n\\* boleto -\n\nboleto\n\\* pay_co -\n\nPayments made via PayCo\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* paypay -\n\nPayPay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* direct_debit -\n\ndirect_debit\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* bancontact -\n\nbancontact\n\\* pay_by_bank -\n\nPay By Bank\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* apple_pay -\n\napple_pay\n\\* qpay -\n\nPayments made via Qpay.\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* gcash -\n\nPayments made via GCash.\n\\* giropay -\n\ngiropay\n\\* sofort -\n\nsofort\n\\* amazon_payments -\n\nAmazon Payments\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* dana -\n\nPayments made via Dana.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. The value is interpreted as per the type of currency.

\n

Prerequisites

\n

Default value

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "

The price/per unit price of the item in major units of the currency. When not provided, the value set for the item price is used.

\n

Prerequisites

\n

Default value

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "

The lowest value in the quantity tier.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "

The highest value in the quantity tier.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/currencies).\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "starting_unit_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the lowest value of quantity in this tier.

\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "ending_unit_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the highest value of quantity in this tier.

\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "gift_receiver" : { "style" : "deepObject", "explode" : true }, "gifter" : { "style" : "deepObject", "explode" : true }, "item_tiers" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "

Resource object representing gift

" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "cancel_a_gift", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "gift-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/gift-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "

Resource object representing gift

" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Updates the attributes of a gift.

\n

Prerequisites & Constraints

", "operationId" : "update_a_gift", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "gift-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/gift-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The new date/time at which the gift notification email is to be sent. The value must be greater than the current time. If no_expiry is false, the value must also be less than claim_expiry_date.

", "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal comment. The comments are not retrievable via API and are only available on request via [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "maxLength" : 250, "example" : null }, "gift_receiver" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift_receiver.\n", "properties" : { "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address of the gift recipient. Must be a valid email address.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the recipient.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the recipient.\n", "maxLength" : 150, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "gift_receiver" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "

Resource object representing gift

" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_gifts", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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])?[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nStatus of the gift. Possible values are : scheduled, unclaimed, claimed, cancelled, expired.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"claimed\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "claimed", "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.\n", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "example" : null }, "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.\n", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "example" : null }, "in" : { "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.\n", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "pattern" : "^\\[(scheduled|unclaimed|claimed|cancelled|expired)(,(scheduled|unclaimed|claimed|cancelled|expired))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "pattern" : "^\\[(scheduled|unclaimed|claimed|cancelled|expired)(,(scheduled|unclaimed|claimed|cancelled|expired))*\\]$", "example" : null } } } }, { "name" : "gift_receiver", "in" : "query", "description" : "Parameters for gift_receiver\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "email" : { "type" : "object", "deprecated" : false, "description" : "Email of the receiver. All gift related emails are sent to this email.\n", "example" : "john@test.com", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "Receiver customer id.\n", "example" : "1xRt6ifdr", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } }, { "name" : "gifter", "in" : "query", "description" : "Parameters for gifter\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "customer_id" : { "type" : "object", "deprecated" : false, "description" : "Gifter customer id.\n", "example" : "1xRt6ifdr", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "Resource object representing gift" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription" } }, "required" : [ "gift", "subscription" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_gift", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})):){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,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "gift-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/gift-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "

Resource object representing gift

" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "claim_a_gift", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "gift-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/gift-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "

Resource object representing gift

" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Note:

For better query performance, we recommend using a date filter (for example, date[after] or date[between]) when listing transactions. If you are already filtering by updated_at, you do not need to also filter by date.

", "operationId" : "list_transactions", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-f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-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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 '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*true\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\* '.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUniquely identifies the transaction.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"txn_88ybdbsnvf2\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "txn_88ybdbsnvf2", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer for which this transaction is made.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"5hjdk8nOpd\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5hjdk8nOpd", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the subscription for which this transaction is made.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"5hjdk8nOpd\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5hjdk8nOpd", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "payment_source_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on Transaction payment source id.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*payment_source_id\\[is\\] = \"pm_3Nl8XXUQUXDVFa2\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "pm_3Nl8XXUQUXDVFa2", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "payment_method", "in" : "query", "description" : "optional, enumerated string filter\n\nThe payment method of this transaction. Possible values are : card, cash, check, chargeback, bank_transfer, amazon_payments, paypal_express_checkout, direct_debit, alipay, alipay_hk, gcash, dana, touch_n_go, tamara, qpay, unionpay, apple_pay, wechat_pay, ach_credit, sepa_credit, ideal, google_pay, sofort, bancontact, giropay, dotpay, other, upi, netbanking_emandates.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*payment_method\\[is_not\\] = \"card\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "card", "properties" : { "is" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay \n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay \n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo \n* `pay_to` - PayTo \n* `faster_payments` - Faster Payments \n* `sepa_instant_transfer` - Sepa Instant Transfer \n* `automated_bank_transfer` - Automated Bank Transfer \n* `klarna_pay_now` - Klarna Pay Now \n* `online_banking_poland` - Online Banking Poland \n* `payconiq_by_bancontact` - Payconiq by Bancontact \n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin \n* `kakao_pay` - Kakao Pay \n* `naver_pay` - Naver Pay \n* `revolut_pay` - Revolut Pay \n* `cash_app_pay` - Cash App Pay \n* `pix` - Payments made via Pix \n* `twint` - Twint \n* `go_pay` - Go Pay \n* `grab_pay` - Grab Pay \n* `pay_co` - Pay Co \n* `after_pay` - After Pay \n* `swish` - Swish \n* `payme` - PayMe \n* `klarna` - Payments made via Klarna \n* `alipay_hk` - Alipay HK \n* `paypay` - PayPay \n* `gcash` - GCash \n* `south_korean_cards` - Payments made via South Korean Cards \n* `paynow` - Payments made via PayNow \n* `bizum` - Payments made via Bizum \n* `promptpay` - Payments made via PromptPay \n* `dana` - Dana \n* `touch_n_go` - Touch 'n Go \n* `tamara` - Tamara \n* `qpay` - Qpay ", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay \n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay \n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo \n* `pay_to` - PayTo \n* `faster_payments` - Faster Payments \n* `sepa_instant_transfer` - Sepa Instant Transfer \n* `automated_bank_transfer` - Automated Bank Transfer \n* `klarna_pay_now` - Klarna Pay Now \n* `online_banking_poland` - Online Banking Poland \n* `payconiq_by_bancontact` - Payconiq by Bancontact \n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin \n* `kakao_pay` - Kakao Pay \n* `naver_pay` - Naver Pay \n* `revolut_pay` - Revolut Pay \n* `cash_app_pay` - Cash App Pay \n* `pix` - Payments made via Pix \n* `twint` - Twint \n* `go_pay` - Go Pay \n* `grab_pay` - Grab Pay \n* `pay_co` - Pay Co \n* `after_pay` - After Pay \n* `swish` - Swish \n* `payme` - PayMe \n* `klarna` - Payments made via Klarna \n* `alipay_hk` - Alipay HK \n* `paypay` - PayPay \n* `gcash` - GCash \n* `south_korean_cards` - Payments made via South Korean Cards \n* `paynow` - Payments made via PayNow \n* `bizum` - Payments made via Bizum \n* `promptpay` - Payments made via PromptPay \n* `dana` - Dana \n* `touch_n_go` - Touch 'n Go \n* `tamara` - Tamara \n* `qpay` - Qpay ", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "in" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay \n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay \n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo \n* `pay_to` - PayTo \n* `faster_payments` - Faster Payments \n* `sepa_instant_transfer` - Sepa Instant Transfer \n* `automated_bank_transfer` - Automated Bank Transfer \n* `klarna_pay_now` - Klarna Pay Now \n* `online_banking_poland` - Online Banking Poland \n* `payconiq_by_bancontact` - Payconiq by Bancontact \n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin \n* `kakao_pay` - Kakao Pay \n* `naver_pay` - Naver Pay \n* `revolut_pay` - Revolut Pay \n* `cash_app_pay` - Cash App Pay \n* `pix` - Payments made via Pix \n* `twint` - Twint \n* `go_pay` - Go Pay \n* `grab_pay` - Grab Pay \n* `pay_co` - Pay Co \n* `after_pay` - After Pay \n* `swish` - Swish \n* `payme` - PayMe \n* `klarna` - Payments made via Klarna \n* `alipay_hk` - Alipay HK \n* `paypay` - PayPay \n* `gcash` - GCash \n* `south_korean_cards` - Payments made via South Korean Cards \n* `paynow` - Payments made via PayNow \n* `bizum` - Payments made via Bizum \n* `promptpay` - Payments made via PromptPay \n* `dana` - Dana \n* `touch_n_go` - Touch 'n Go \n* `tamara` - Tamara \n* `qpay` - Qpay ", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay \n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay \n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo \n* `pay_to` - PayTo \n* `faster_payments` - Faster Payments \n* `sepa_instant_transfer` - Sepa Instant Transfer \n* `automated_bank_transfer` - Automated Bank Transfer \n* `klarna_pay_now` - Klarna Pay Now \n* `online_banking_poland` - Online Banking Poland \n* `payconiq_by_bancontact` - Payconiq by Bancontact \n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin \n* `kakao_pay` - Kakao Pay \n* `naver_pay` - Naver Pay \n* `revolut_pay` - Revolut Pay \n* `cash_app_pay` - Cash App Pay \n* `pix` - Payments made via Pix \n* `twint` - Twint \n* `go_pay` - Go Pay \n* `grab_pay` - Grab Pay \n* `pay_co` - Pay Co \n* `after_pay` - After Pay \n* `swish` - Swish \n* `payme` - PayMe \n* `klarna` - Payments made via Klarna \n* `alipay_hk` - Alipay HK \n* `paypay` - PayPay \n* `gcash` - GCash \n* `south_korean_cards` - Payments made via South Korean Cards \n* `paynow` - Payments made via PayNow \n* `bizum` - Payments made via Bizum \n* `promptpay` - Payments made via PromptPay \n* `dana` - Dana \n* `touch_n_go` - Touch 'n Go \n* `tamara` - Tamara \n* `qpay` - Qpay ", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null } } } }, { "name" : "gateway", "in" : "query", "description" : "optional, enumerated string filter\n\nGateway 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.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*gateway\\[is\\] = \"stripe\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "stripe", "properties" : { "is" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `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.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `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. \n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type. \n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network. \n* `ezidebit` - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.
Ezidebit is in beta.
\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `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.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `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. \n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type. \n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network. \n* `ezidebit` - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.
Ezidebit is in beta.
\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "in" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `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.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `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. \n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type. \n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network. \n* `ezidebit` - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.
Ezidebit is in beta.
\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "pattern" : "^\\[(chargebee|chargebee_payments|adyen|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|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|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable)(,(chargebee|chargebee_payments|adyen|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|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|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `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.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `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. \n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type. \n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network. \n* `ezidebit` - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.
Ezidebit is in beta.
\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "pattern" : "^\\[(chargebee|chargebee_payments|adyen|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|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|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable)(,(chargebee|chargebee_payments|adyen|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|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|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable))*\\]$", "example" : null } } } }, { "name" : "gateway_account_id", "in" : "query", "description" : "optional, string filter\n\nThe gateway account used for this transaction.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*gateway_account_id\\[is\\] = \"gw_3Nl9BNeQ7438Ks1\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "gw_3Nl9BNeQ7438Ks1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "id_at_gateway", "in" : "query", "description" : "optional, string filter\n\nThe id with which this transaction is referred in gateway.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*id_at_gateway\\[is_not\\] = \"txn_5678HJS89900\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "txn_5678HJS89900", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "reference_number", "in" : "query", "description" : "

optional, string filter

\n

The reference number for this transaction. For example, the check number when payment_method\n= check\n.\nSupported operators :\nis, is_not, starts_with, is_present

\n

Example →\nreference_number[is] = "cus_u239732"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "cus_u239732", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nType of the transaction. Possible values are : authorization, payment, refund, payment_reversal.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is_not\\] = \"payment\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "payment", "properties" : { "is" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the amount from the customer’s payment_source.\n* `payment` - The transaction represents capture of amount from the customer’s payment_source.\n* `refund` - The transaction represents a refund of amount to the customer’s payment_source.\n* `payment_reversal` - Indicates a reversal transaction.", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the amount from the customer’s payment_source.\n* `payment` - The transaction represents capture of amount from the customer’s payment_source.\n* `refund` - The transaction represents a refund of amount to the customer’s payment_source.\n* `payment_reversal` - Indicates a reversal transaction.", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "example" : null }, "in" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the amount from the customer’s payment_source.\n* `payment` - The transaction represents capture of amount from the customer’s payment_source.\n* `refund` - The transaction represents a refund of amount to the customer’s payment_source.\n* `payment_reversal` - Indicates a reversal transaction.", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "pattern" : "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the amount from the customer’s payment_source.\n* `payment` - The transaction represents capture of amount from the customer’s payment_source.\n* `refund` - The transaction represents a refund of amount to the customer’s payment_source.\n* `payment_reversal` - Indicates a reversal transaction.", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "pattern" : "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\]$", "example" : null } } } }, { "name" : "date", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Indicates when this transaction occurred.\nWe recommend using this filter when listing transactions for better query performance. It is advisable when using this filter, to pass the sort_by\ninput parameter as date\nfor a faster response.\nSupported operators :\nafter, before, on, between

\n

Example →\ndate[before] = "1435054328"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "amount", "in" : "query", "description" : "optional, in cents filter\n\nAmount for this transaction.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount\\[gt\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_capturable", "in" : "query", "description" : "optional, in cents filter\n\nTo filter based on transaction's unused authorized/blocked amount.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_capturable\\[lt\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe status of this transaction. Possible values are : in_progress, success, voided, failure, timeout, needs_attention.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"success\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "success", "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 \\* \\`late_failure\\` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "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 \\* \\`late_failure\\` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "in" : { "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 \\* \\`late_failure\\` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "pattern" : "^\\[(in_progress|success|voided|failure|timeout|needs_attention|late_failure)(,(in_progress|success|voided|failure|timeout|needs_attention|late_failure))*\\]$", "example" : null }, "not_in" : { "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 \\* \\`late_failure\\` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "pattern" : "^\\[(in_progress|success|voided|failure|timeout|needs_attention|late_failure)(,(in_progress|success|voided|failure|timeout|needs_attention|late_failure))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.\nSupported operators :\nafter, before, on, between

\n

Example →\nupdated_at[after] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/reconcile" : { "post" : { "summary" : "Reconcile transaction", "description" : "

Update selected attributes of the transaction resource: status, id_at_gateway, and customer_id. Use this API for reconciliation purposes where the status of a transaction is in needs_attention that can be updated to either success or failure status.

", "operationId" : "reconcile_transaction", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id_at_gateway" : { "type" : "string", "deprecated" : false, "description" : "

The identifier with which this transaction is referred in gateway. The id_at_gateway\ncan only be updated when the transaction status is in needs_attention.

\n

Note:

", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

Unique identifier of the customer for which this transaction is made. This is needed only when the transaction is successful but not associated with any customer.

\n

Note:

An error occurs when the provided customer_id\nvalue does not match the customer_id\nvalue stored against the transaction in Chargebee.

", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of this transaction. The status can only be updated when the transaction status is in needs_attention\nstate.

\n* failure -

When the transaction is in failure status.

\n

Note:

When the transaction is updated to failure status and the invoice is associated with the transaction,

\n* success -

When the transaction is successful.

\n

Note:

When the transaction is updated to success\nstatus, - and the invoice is associated with the transaction, the transaction amount will be applied to the invoice.

", "enum" : [ "success", "failure" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_transaction", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 transactions of type = payment. You can only refund a transaction whose 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The amount to be refunded. Must not exceed amount_unused.\nIf not passed then all of amount_unused\nis refunded.

", "minimum" : 1, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the refund.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 transactions of 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The amount to be recorded as refunded. Must not exceed amount_unused.\nIf not passed then all of amount_unused\nis recorded as refunded.

", "minimum" : 1, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "

The payment method used to make the refund.

\n* check -

Check

\n* cash -

Cash

\n* custom -

Custom

\n* chargeback -

Only applicable for a transaction of type\n= refund.\nThis value is set by Chargebee when an automated chargeback\noccurs. You can also set this explicitly when recording a refund\n.

\n* other -

Payment Methods other than the above types

\n* bank_transfer -

Bank Transfer

", "enum" : [ "cash", "check", "chargeback", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the refund was made.\n", "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "

The reference number for this transaction. For example, the check number when payment_method\n= check\n.

", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the refund.\n", "maxLength" : 300, "example" : null } }, "required" : [ "date", "payment_method" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "void_an_authorization_transaction", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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/payments/2.0/payment-gateways-and-configuration/stripe#auth-and-capture). \n* Supported only for Card payments.\n* Currently supported only for **Stripe**.\n", "operationId" : "create_an_authorization_payment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for authorizing the transaction.\n", "maxLength" : 40, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the transaction amount.\n", "maxLength" : 3, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be blocked.\n", "minimum" : 1, "example" : null } }, "required" : [ "amount", "customer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "delete_an_offline_transaction", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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}(?:(?: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "

Resource object representing transaction

" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 and one-time charges.

The following steps describe how best to use this API:

    \n
  1. Call this endpoint, providing item prices, charges, coupons and a host of other details such as billing and shipping addresses of the customer, to be prefilled on the checkout page. You may also provide pass_thru_content containing information and IDs from your systems that must be associated with the checkout page.
  2. \n
  3. Send the customer to the Checkout url received in the response.
  4. \n
  5. 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.
  6. \n
  7. Retrieve the hosted page at this stage to get the invoice details.
  8. \n

Customer resource lookup and creation

When 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 an autogenarated ID, and the hosted_page is created.

Multiple business entities

If multiple business entities are created for the site, the customer resource lookup and creation happen within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context , and if not found, the resource is created for the default business entity 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features) 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). \n**See also**\n[Customer resource lookup and creation.](/docs/api/hosted_pages)\n", "maxLength" : 50, "example" : null }, "layout" : { "type" : "string", "deprecated" : false, "description" : "Specifies the UI layout for the hosted page. This overrides [the layout](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/hosted-checkout#ui-layout-options) configured in Chargebee Billing.\n\\* in_app -\n\nRenders the hosted page in an in-app layout.\n\\* full_page -\n\nRenders the hosted page in a full-page layout.\n", "enum" : [ "in_app", "full_page" ], "example" : null }, "invoice_note" : { "type" : "string", "deprecated" : false, "description" : "A note for this particular invoice. This, and [all other notes](/docs/api/invoices/invoice-object#notes)\nfor the invoice are displayed on the PDF invoice sent to the customer.\n", "maxLength" : 2000, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the invoice amount.\n", "maxLength" : 3, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "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

Note :

\n", "maxLength" : 250, "example" : null }, "cancel_url" : { "type" : "string", "deprecated" : false, "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: - Cancel URL configured in Settings \\> Hosted Pages Settings would be overriden by this cancel URL.\n*Eg : http://yoursite.com?id=\\&state=cancelled*\n\n* This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.\n", "maxLength" : 250, "example" : null }, "pass_thru_content" : { "type" : "string", "deprecated" : false, "description" : "

This attribute allows you to store custom information with the hosted_page object. You can use it to associate specific data with a hosted page session.\nFor example, you can store the ID of the marketing campaign that initiated the user session. After a successful checkout, when the customer is redirected, you can retrieve the hosted page ID from the redirect URL's query parameters. Using this ID, you can fetch the hosted page and perform actions related to the success of the marketing campaign.

", "maxLength" : 2048, "example" : null }, "customer" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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

Customer resource lookup and creation.
", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer. If not provided it will be got from contact information entered in the hosted page\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer. If not provided it will be got from contact information entered in the hosted page\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "

Specifies if the customer is liable for tax

\n* exempt - \n* taxable -

Computes tax for the customer based on the site configuration.\nIn 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.

", "enum" : [ "taxable", "exempt" ], "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "

The VAT/tax registration number for the customer. For customers with billing_address

\n

country\nas\nXI\n(which is United Kingdom - Northern Ireland\n), the first two characters of the full VAT number\ncan be overridden by setting\nvat_number_prefix\n.

", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "einvoicing_method" : { "type" : "string", "deprecated" : false, "description" : "

Determines whether e-invoices are sent manually or automatically.

\n* manual -

When manual is selected, automatic e-invoice sending is disabled. Use this value to send e-invoices manually through the UI or the API.

\n* automatic -

Use this value to send an e-invoice every time an invoice or credit note is created.

\n* site_default -

The default value of the site, which can be overridden at the customer level.

", "enum" : [ "automatic", "manual", "site_default" ], "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the customer is e-invoiced. When set to true\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (billing_address.country\n). When set to false\n, the customer is not e-invoiced even if e-invoicing is enabled for their country.

\n

Tip:

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", "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "

The standard used for specifying the entity_identifier_scheme.\nCurrently only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "consolidated_invoicing" : { "type" : "boolean", "deprecated" : false, "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. This parameter can be provided only when Consolidated Invoicing is enabled.

\n

Note:

Any invoices raised when a subscription activates from in_trial or future status, are not consolidated by default. Contact Support to enable consolidation for such invoices.

", "example" : null } }, "example" : null }, "invoice" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice\n", "properties" : { "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "item_prices" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_prices\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "

A unique ID of the item price to be added to the invoice.

\n

Constraints\nThe item price must have item_type set to charge.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Item price quantity\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price or per-unit-price of the item price. By default, it is the value set\nfor the item_price.\nThis is only applicable when the pricing_model\nof the item_price\nis flat_fee\nor per_unit.\nThe value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the item starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the item ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price to which this tier belongs.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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 ).\nProvide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this charge\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "taxable" : { "type" : "array", "description" : "The amount to be charged is taxable or not.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "tax_profile_id" : { "type" : "array", "description" : "Tax profile of the charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "hsn_code" : { "type" : "array", "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* retail -\n\nTransaction is a sale to an end user\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the charge starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the charge ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "apply_on" ], "example" : null }, "entity_identifiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for entity_identifiers\n", "properties" : { "id" : { "type" : "array", "description" : "

The unique id for the entity_identifier[i]\nin Chargebee. This is required when entity_identifier[operation][i]\nis update\nor delete\n.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "scheme" : { "type" : "array", "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value of the entity_identifier.\nThis identifies the customer entity on the Peppol network. For example: 10101010-STO-10\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "operation" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be performed for the entity_identifier\n.

\n\n* create -

Creates a new entity_identifier\nfor the customer.

\n* update -

Updates an existing entity_identifier\nfor the customer. entity_identifier[id]\nmust be provided in this case.

\n* delete -

Deletes an existing entity_identifier\nfor the customer. entity_identifier[id]\nmust be provided in this case.

", "enum" : [ "create", "update", "delete" ], "example" : null }, "example" : null }, "standard" : { "type" : "array", "description" : "

The standard used for specifying the entity_identifier\nscheme.\nCurrently, only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If 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[].

", "items" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Use one of the following methods to open the hosted page:

Do not embed the hosted page in your own iframe.

", "operationId" : "extend_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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])?[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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "expiry" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Expiry (in days) for the link generated. No expiry will be set if this is not specified.\n", "maximum" : 500, "minimum" : 1, "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of billing cycles by which the subscription should be extended.

\n

Default behavior

", "minimum" : 1, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "notify_an_event", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-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){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "event_name" : { "type" : "string", "deprecated" : false, "description" : "The event that need to passed to a different system.\n\\* cancellation_page_loaded -\n\nIndicates native cancellation flow provided by the merchant is loaded rather than the retention flow.\n", "enum" : [ "cancellation_page_loaded" ], "example" : null }, "occurred_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this event had occurred.\n.\n", "example" : null }, "event_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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.

\n", "example" : null } }, "required" : [ "event_data", "event_name" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "success" : { "type" : "boolean", "deprecated" : false, "description" : "

Event was processed successfully.

", "example" : null } }, "required" : [ "success" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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

When 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 are created for the site, the lookup and creation of the gifter customer resource happen within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context, and if not found, the resource is created for the default business entity of the site.

Gift receiver customer resource lookup and creation

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 are created for the site, the lookup and creation of the gift receiver's customer resource happen within the 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "layout" : { "type" : "string", "deprecated" : false, "description" : "Specifies the UI layout for the hosted page. This overrides [the layout](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/hosted-checkout#ui-layout-options) configured in Chargebee Billing.\n\\* in_app -\n\nRenders the hosted page in an in-app layout.\n\\* full_page -\n\nRenders the hosted page in a full-page layout.\n", "enum" : [ "in_app", "full_page" ], "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features) 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). \n**See also**\n\nGifter customer resource lookup and creation.\n", "maxLength" : 50, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "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

Note :

\n", "maxLength" : 250, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "gifter" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gifter\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "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[Gifter customer resource lookup and creation](/docs/api/hosted_pages)\n", "maxLength" : 50, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. The value is interpreted as per the type of currency.

\n

Prerequisites

\n

Default value

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "

The price/per unit price of the item in major units of the currency. When not provided, the value set for the item price is used.

\n

Prerequisites

\n

Default value

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "

The lowest value in the quantity tier.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "

The highest value in the quantity tier.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/currencies).\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "starting_unit_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the lowest value of quantity in this tier.

\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "ending_unit_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the highest value of quantity in this tier.

\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "gifter" : { "style" : "deepObject", "explode" : true }, "item_tiers" : { "style" : "deepObject", "explode" : true }, "subscription_items" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_hosted_pages", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUnique identifier generated for each hosted page requested.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"Edi69nxpu6BeGBd9Fjcd0tqCSwb0sRcuKa\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Edi69nxpu6BeGBd9Fjcd0tqCSwb0sRcuKa", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nType 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.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is_not\\] = \"checkout_new\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "checkout_new", "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\\` - \\*\\*(Deprecated)\\*\\* 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 \\* \\`accept_quote\\` - Accept Quote\n", "enum" : [ "checkout_new", "checkout_existing", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ], "example" : null }, "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\\` - \\*\\*(Deprecated)\\*\\* 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 \\* \\`accept_quote\\` - Accept Quote\n", "enum" : [ "checkout_new", "checkout_existing", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`checkout_new\\` - Checkout new Subscription \\* \\`checkout_existing\\` - Checkout existing Subscription \\* \\`update_card\\` - \\*\\*(Deprecated)\\*\\* Update Card for a Customer \\* \\`update_payment_method\\` - \\*\\*(Deprecated)\\*\\* 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 \\* \\`accept_quote\\` - Accept Quote\n", "enum" : [ "checkout_new", "checkout_existing", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ], "pattern" : "^\\[(checkout_new|checkout_existing|update_card|update_payment_method|manage_payment_sources|collect_now|extend_subscription|checkout_one_time|pre_cancel|view_voucher|accept_quote)(,(checkout_new|checkout_existing|update_card|update_payment_method|manage_payment_sources|collect_now|extend_subscription|checkout_one_time|pre_cancel|view_voucher|accept_quote))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`checkout_new\\` - Checkout new Subscription \\* \\`checkout_existing\\` - Checkout existing Subscription \\* \\`update_card\\` - \\*\\*(Deprecated)\\*\\* Update Card for a Customer \\* \\`update_payment_method\\` - \\*\\*(Deprecated)\\*\\* 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 \\* \\`accept_quote\\` - Accept Quote\n", "enum" : [ "checkout_new", "checkout_existing", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ], "pattern" : "^\\[(checkout_new|checkout_existing|update_card|update_payment_method|manage_payment_sources|collect_now|extend_subscription|checkout_one_time|pre_cancel|view_voucher|accept_quote)(,(checkout_new|checkout_existing|update_card|update_payment_method|manage_payment_sources|collect_now|extend_subscription|checkout_one_time|pre_cancel|view_voucher|accept_quote))*\\]$", "example" : null } } } }, { "name" : "state", "in" : "query", "description" : "optional, enumerated string filter\n\nIndicating the current state of the hosted page resource. Possible values are : created, requested, succeeded, cancelled, acknowledged.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*state\\[is\\] = \"succeeded\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "succeeded", "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.\n", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "example" : null }, "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.\n", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "example" : null }, "in" : { "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.\n", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "pattern" : "^\\[(created|requested|succeeded|cancelled|failed|acknowledged)(,(created|requested|succeeded|cancelled|failed|acknowledged))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "pattern" : "^\\[(created|requested|succeeded|cancelled|failed|acknowledged)(,(created|requested|succeeded|cancelled|failed|acknowledged))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this hosted page was last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1490784813\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1490784813", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page" } }, "required" : [ "hosted_page" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nresource of type, view_voucher\n. 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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,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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_voucher" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_voucher\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique [ID of the voucher](/docs/api/payment_vouchers/payment_voucher-object#id)\nwhich the customer wants to view.\n", "maxLength" : 40, "example" : null } }, "required" : [ "id" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "locale" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "payment_voucher" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Open the hosted page in a new browser tab or window using the url from this API's response. Do not embed it in your own iframe.

openCheckout() not supported

The Chargebee.js openCheckout() function does not support Collect Now hosted pages. To open a Collect Now page, open the url from this API's response in a new browser tab or window (for example, window.open(response.hosted_page.url, '_blank')).

", "operationId" : "collect_now", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|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{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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "Used to specify the destination URL to which a user is redirected after invoices are paid. The [transaction ID](/docs/api/transactions/transaction-object#id)\nof the transactions made through the Pay Now hosted page will be sent as return variables along with the URL.\n", "maxLength" : 250, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the specified *credit amount*\n.\n", "maxLength" : 3, "example" : null }, "payment_method_save_policy" : { "type" : "string", "deprecated" : false, "description" : "Determines whether the payment method should be saved to the customer's account.\n\\* ask -\n\nLet the customer choose whether to save the payment method.\n\\* never -\n\nDo not save the payment method.\n\\* always -\n\nAutomatically save the payment method to the customer's account for future use.\n", "enum" : [ "always", "ask", "never" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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. \n* Customers with existing subscriptions can generate a quote for new subscriptions. However, Hosted page URL to accept a quote cannot be generated for new subscriptions in V1 and V2 hosted pages.\n", "operationId" : "accept_a_quote", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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]))\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "redirect_url" : { "type" : "string", "deprecated" : false, "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

Note :

\n", "maxLength" : 250, "example" : null }, "layout" : { "type" : "string", "deprecated" : false, "description" : "Specifies the UI layout for the hosted page. This overrides [the layout](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/hosted-checkout#ui-layout-options) configured in Chargebee Billing.\n\\* full_page -\n\nRenders the hosted page in a full-page layout.\n\\* in_app -\n\nRenders the hosted page in an in-app layout.\n", "enum" : [ "in_app", "full_page" ], "example" : null }, "quote" : { "type" : "object", "deprecated" : false, "description" : "Parameters for quote\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The quote number. Acts as a identifier for quote and typically generated sequentially.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "quote" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\nThe following steps describe how best to use this API:\nCall this endpoint, providing item prices, coupons and a host of other details such as billing and shipping addresses to be prefilled for the customer on the checkout page. You may also provide pass_thru_content containing information and IDs from your systems that must be associated with the checkout page.

Warning\nThe first item price in the list (parameter subscription_items[item_price_id][0]) must be an item_price of item_type plan.

Customer resource lookup and creation

When the 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 an autogenarated ID and the subscription is created under it.

Multiple business entities

If multiple business entities are created for the site, the customer resource lookup and creation happen within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context, and if not found, the resource is created for the default business entity of the site.

\n

Use Cases

Billing address editing

The billing_address cannot be edited by the user during the Checkout session in either of the following cases:

    \n
  • When the billing_address attribute for the customer resource is already set.
  • \n
  • You pass all mandatory billing_address fields via this API.
  • \n

In such cases, to allow customers to update their billing address, use one of the following options:

Chargebee Hosted Pages
    \n
  • Integrate Chargebee.js into your website or application. Use the openSection() function with options.sectionType set to ADDRESS to display the Customer Portal's address section.
  • \n
  • Integrate the Customer Portal into your website or application. The Portal enables customers to manage their address information.
  • \n
Customer API
", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "layout" : { "type" : "string", "deprecated" : false, "description" : "Specifies the UI layout for the hosted page. This overrides [the layout](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/hosted-checkout#ui-layout-options) configured in Chargebee Billing.\n\\* in_app -\n\nRenders the hosted page in an in-app layout.\n\\* full_page -\n\nRenders the hosted page in a full-page layout.\n", "enum" : [ "in_app", "full_page" ], "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features) 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). \n**See also**\n[Customer resource lookup and creation.](/docs/api/hosted_pages)\n", "maxLength" : 50, "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles)\nis used.\n", "minimum" : 0, "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "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

Note :

\n", "maxLength" : 250, "example" : null }, "cancel_url" : { "type" : "string", "deprecated" : false, "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: - Cancel URL configured in Settings \\> Hosted Pages Settings would be overriden by this cancel URL.\n*Eg : http://yoursite.com?id=\\&state=cancelled*\n\n* This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.\n", "maxLength" : 250, "example" : null }, "pass_thru_content" : { "type" : "string", "deprecated" : false, "description" : "

This attribute allows you to store custom information with the hosted_page object. You can use it to associate specific data with a hosted page session.\nFor example, you can store the ID of the marketing campaign that initiated the user session. After a successful checkout, when the customer is redirected, you can retrieve the hosted page ID from the redirect URL's query parameters. Using this ID, you can fetch the hosted page and perform actions related to the success of the marketing campaign.

", "maxLength" : 2048, "example" : null }, "allow_offline_payment_methods" : { "type" : "boolean", "deprecated" : false, "description" : "Allow the customer to select an offline payment method during checkout. The choice of payment methods can be configured via the Chargebee UI.\n", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for a new subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\nSet it to 0\nto have no trial period. This parameter overrides the item_price_trial_period\ndirectly.

", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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:

\n", "example" : null }, "coupon" : { "type" : "string", "deprecated" : false, "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.\n\n* **resource_not_found :** Returned if the coupon is not present.\n* **resource_limit_exhausted :** Returned if the coupon has expired or the maximum redemption for the coupon has already been reached.\n* **invalid_request :** Returned if the coupon is not applicable for the particular plan/addon.\n", "maxLength" : 100, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null } }, "example" : null }, "customer" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier for the customer resource for which the subscription should be created.

\n

See also\nCustomer resource lookup and creation.

\n", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer. If not provided it will be got from contact information entered in the hosted page\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer. If not provided it will be got from contact information entered in the hosted page\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "

Specifies if the customer is liable for tax

\n* exempt - \n* taxable -

Computes tax for the customer based on the site configuration.\nIn 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.

", "enum" : [ "taxable", "exempt" ], "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "

The VAT/tax registration number for the customer. For customers with billing_address

\n

country\nas\nXI\n(which is United Kingdom - Northern Ireland\n), the first two characters of the full VAT number\ncan be overridden by setting\nvat_number_prefix\n.

", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the customer is e-invoiced. When set to true\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (billing_address.country\n). When set to false\n, the customer is not e-invoiced even if e-invoicing is enabled for their country.

\n

Tip:

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", "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "

The standard used for specifying the entity_identifier_scheme.\nCurrently only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "einvoicing_method" : { "type" : "string", "deprecated" : false, "description" : "Determines whether to send einvoice manually or automatic.\n\\* manual -\n\nWhen manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API.\n\\* automatic -\n\nUse this value to send e-invoice every time an invoice or credit note is created.\n\\* site_default -\n\nThe default value of the site which can be overridden at the customer level.\n", "enum" : [ "automatic", "manual", "site_default" ], "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "

The unique identifier of the item price. The first item price in the list (subscription_items[item_price_id][0]\n) must be an item_price\nof item_type\nplan\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis 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-object#price)\nis 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/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The date/time when the trial period of the item ends. This applies to plan-items.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "**Not supported**:\nThis parameter is not supported in the API. If included in a request, it will be ignored.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/hosted_pages)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "entity_identifiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for entity_identifiers\n", "properties" : { "id" : { "type" : "array", "description" : "

The unique id for the entity_identifier[i]\nin Chargebee. This is required when entity_identifier[operation][i]\nis update\nor delete\n.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "scheme" : { "type" : "array", "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value of the entity_identifier.\nThis identifies the customer entity on the Peppol network. For example: 10101010-STO-10\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "operation" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be performed for the entity_identifier\n.

\n\n* create -

Creates a new entity_identifier\nfor the customer.

\n* update -

Updates an existing entity_identifier\nfor the customer. entity_identifier[id]\nmust be provided in this case.

\n* delete -

Deletes an existing entity_identifier\nfor the customer. entity_identifier[id]\nmust be provided in this case.

", "enum" : [ "create", "update", "delete" ], "example" : null }, "example" : null }, "standard" : { "type" : "array", "description" : "

The standard used for specifying the entity_identifier\nscheme.\nCurrently, only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If 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[].

", "items" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "claim_a_gift_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "redirect_url" : { "type" : "string", "deprecated" : false, "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

Note :

\n", "maxLength" : 250, "example" : null }, "gift" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a gift\n", "maxLength" : 150, "example" : null } }, "required" : [ "id" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "locale" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "gift" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

The following steps describe how best to use this API:

Provide item prices, coupons and a host of other details such as billing and shipping addresses to be prefilled for the customer on the checkout page. You may also provide pass_thru_content containing information and IDs from your systems that must be associated with the checkout page.

Warning\nThe first item price in the list (parameter subscription_items[item_price_id][0]) must be an item_price of item_type plan.

\n

Impacts

Subscription and Ramps: Impact on existing scheduled changes

    \n
  • If the subscription has existing scheduled changes, the behavior depends on whether Ramps are enabled:\n
      \n
    • Ramps disabled: Any existing scheduled change on the subscription is deleted.
    • \n
    • Ramps enabled with compatibility mode:\n
        \n
      • If only one ramp is present:\n
          \n
        • If the ramp was created using this API, the ramp is deleted.
        • \n
        • If the ramp was created using the Create a ramp API, and the date-time of the new change is before the date-time of the ramp, then the ramp is moved to draft status if the auto-draft conditions are met.
        • \n
        \n
      • \n
      • If multiple ramps are present: all ramps after the date-time of the new change are moved to draft status if the auto-draft conditions are met.
      • \n
      \n
    • \n
    \n
  • \n
  • For more details, see Ramps API compatibility mode.
  • \n
\n

Use Cases

Edit billing address

If the billing_address attribute for the customer resource is already set, then the billing_address cannot be edited by the user during the Checkout session. To allow customers to update their billing address, use one of the following options:

Chargebee Hosted Pages
    \n
  • Integrate Chargebee.js into your website or application. Use the openSection() function with options.sectionType set to ADDRESS to display the Customer Portal's address section.
  • \n
  • Integrate the Customer Portal into your website or application. The Portal enables customers to manage their address information.
  • \n
Customer API
", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "layout" : { "type" : "string", "deprecated" : false, "description" : "Specifies the UI layout for the hosted page. This overrides [the layout](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/hosted-checkout#ui-layout-options) configured in Chargebee Billing.\n\\* in_app -\n\nRenders the hosted page in an in-app layout.\n\\* full_page -\n\nRenders the hosted page in a full-page layout.\n", "enum" : [ "in_app", "full_page" ], "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_items_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

If true\nthen the existing subscription_items\nlist for the subscription is replaced by the one provided. If false\nthen the provided subscription_items\nlist gets added to the existing list.

", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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\nis set to true\n, 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.\nWhen passing this parameter, the following prerequisites must be met:

\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Billing cycles set for plan-item price is used by default.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles to invoice in advance.\nIf a new term is started for the subscription due to this API call, then terms_to_charge\nis inclusive of this new term. See description for the force_term_reset\nparameter to learn more about when a subscription term is reset.

", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

If the subscription status\nis cancelled\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\nNote:\nIt is recommended not to pass this parameter along with changed_scheduled_at.\nreactivate_from\ncan 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", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

If true\nthen the existing coupon_ids\nlist for the subscription is replaced by the one provided. If false\nthen the provided coupon_ids\nlist gets added to the existing list.

", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "description" : "

This parameter is only relevant for cancelled\nsubscriptions. When set to true\n, it activates the canceled subscription; otherwise, subscription changes are applied without altering its status.\nAdditionally, if not explicitly set and the subscription_items\nprovided in the API differ from the existing items, the subscription will still be reactivated.

", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Note: This parameter is relevant only for subscriptions with status of active, non_renewing, or cancelled.

\n

When you set this parameter to true, the subscription term resets to the date of the subscription change.\nBy default, if you change the plan-item price to another with the same billing period, the subscription term remains unchanged. For example, if the subscription renews on the 28th of every month, it will continue to renew on the 28th after the change.

\n

Note: If the new plan-item price has a different billing period from the current plan-item price, the subscription term resets automatically, regardless of the value of force_term_reset.

\n

Constraints\nIf you pass force_term_reset, you must also pass invoice_usages with the same value when all of the following site configuration settings are enabled:

", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "

Specifies when the subscription change takes effect.

\n

See also

\n* end_of_term -

Deprecated\nThis option is deprecated; use the Create a ramp API instead.

\n

The change is carried out at the end of the current billing cycle of the subscription.

\n* specific_date -

Deprecated for scheduling changes\nThis option is deprecated for scheduling changes to occur at a future date-time, use the Create a ramp API instead.

\n

Executes the change on a specified date. The change occurs as of the date-time defined in changes_scheduled_at.

\n* immediately -

The subscription change takes effect immediately.

", "enum" : [ "immediately", "end_of_term", "specific_date" ], "example" : null }, "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date-time at which the subscription change is to happen or has happened.

\n

Required if

\n

Deprecated for scheduling changes

\n

Constraints

\n

Backdated changes\nchanges_scheduled_atcan 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:

", "example" : null }, "invoice_usages" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Setting this attribute to true will invoice the overages for the metered items during the subscription change.

\n

Constraints\nIf you pass invoice_usages, you must also pass force_term_reset with the same value when all of the following site configuration settings are enabled:

", "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "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

Note :

\n", "maxLength" : 250, "example" : null }, "cancel_url" : { "type" : "string", "deprecated" : false, "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: - Cancel URL configured in Settings \\> Hosted Pages Settings would be overriden by this cancel URL.\n*Eg : http://yoursite.com?id=\\&state=cancelled*\n\n* This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.\n", "maxLength" : 250, "example" : null }, "pass_thru_content" : { "type" : "string", "deprecated" : false, "description" : "

This attribute allows you to store custom information with the hosted_page object. You can use it to associate specific data with a hosted page session.\nFor example, you can store the ID of the marketing campaign that initiated the user session. After a successful checkout, when the customer is redirected, you can retrieve the hosted page ID from the redirect URL's query parameters. Using this ID, you can fetch the hosted page and perform actions related to the success of the marketing campaign.

", "maxLength" : 2048, "example" : null }, "allow_offline_payment_methods" : { "type" : "boolean", "deprecated" : false, "description" : "Allow the customer to select an offline payment method during checkout. The choice of payment methods can be configured via the Chargebee UI.\n", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The new start date of a future\nsubscription. Applicable only for future\nsubscriptions.

", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription status\nis future\n, in_trial\n, or cancelled.\nAlso, the value must not be earlier than changes_scheduled_at\nor start_date.\nNote:\nThis parameter can be backdated (set to a value in the past) only when the subscription is in cancelled\nor in_trial\nstatus.\nDo this to keep a record of when the trial ended in case it ended at some point in the past. When trial_end\nis backdated, the subscription immediately goes into active\nor non_renewing\nstatus. This parameter overrides the item_price_trial_period\ndirectly.

", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null } }, "required" : [ "id" ], "example" : null }, "customer" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "

The VAT/tax registration number for the customer. For customers with billing_address

\n

country\nas\nXI\n(which is United Kingdom - Northern Ireland\n), the first two characters of the full VAT number\ncan be overridden by setting\nvat_number_prefix\n.

", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the customer is e-invoiced. When set to true\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (billing_address.country\n). When set to false\n, the customer is not e-invoiced even if e-invoicing is enabled for their country.

\n

Tip:

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", "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "

The standard used for specifying the entity_identifier_scheme.\nCurrently only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "

The unique identifier of the item price. The first item price in the list (subscription_items[item_price_id][0]\n) must be an item_price\nof item_type\nplan\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "

When price overriding\nis enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing\nis enabled. If changes_scheduled_at\nis in the past and a unit_price_in_decimal\nis 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" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The date/time when the trial period of the item ends. This applies to plan-items.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "**Not supported**:\nThis parameter is not supported in the API. If included in a request, it will be ignored.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "operation_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be carried out for the discount.

\n\n* add -

The discount is attached to the subscription.

\n* remove -

The discount (given by discounts[id]\n) is removed from the subscription. Subsequent invoices will no longer have the discount applied. Tip:\nIf you want to replace a discount, remove\nit and add\nanother in the same API call.

", "enum" : [ "add", "remove" ], "example" : null }, "example" : null }, "id" : { "type" : "array", "description" : "An immutable unique id for the discount. It is always auto-generated.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "duration_type", "operation_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/hosted_pages)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "entity_identifiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for entity_identifiers\n", "properties" : { "id" : { "type" : "array", "description" : "

The unique id for the entity_identifier[i]\nin Chargebee. This is required when entity_identifier[operation][i]\nis update\nor delete\n.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "scheme" : { "type" : "array", "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value of the entity_identifier.\nThis identifies the customer entity on the Peppol network. For example: 10101010-STO-10\n.

\n

Tip:

If 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[].

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "operation" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be performed for the entity_identifier\n.

\n\n* create -

Creates a new entity_identifier\nfor the customer.

\n* update -

Updates an existing entity_identifier\nfor the customer. entity_identifier[id]\nmust be provided in this case.

\n* delete -

Deletes an existing entity_identifier\nfor the customer. entity_identifier[id]\nmust be provided in this case.

", "enum" : [ "create", "update", "delete" ], "example" : null }, "example" : null }, "standard" : { "type" : "array", "description" : "

The standard used for specifying the entity_identifier\nscheme.\nCurrently, only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If 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[].

", "items" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nresource of type\npre_cancel\n. 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 Growth app\n, along with the data provided as input to this endpoint. Call the endpoint before your customer clicks the Cancel\nbutton, and when they do, route them to the url\nin the endpoint response.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "pass_thru_content" : { "type" : "string", "deprecated" : false, "description" : "

Additional data to be passed to Chargebee Growth. Only the value of pass_thru_content.custom is sent to Chargebee Growth. It is sent as the value of the custom property. The fields provided in pass_thru_content.custom must be preconfigured in Chargebee Growth.

\n

Although only pass_thru_content.custom is sent to Chargebee Growth, all of pass_thru_content is stored by Chargebee Billing and is retrievable as an attribute of the hosted_page.\n.

", "maxLength" : 2048, "example" : null }, "cancel_url" : { "type" : "string", "deprecated" : false, "description" : "The customer is sent to this URL if they finally decide to cancel the subscription, despite the attempt to retain them.\n", "maxLength" : 250, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "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**\nto cancel the subscription.\n", "maxLength" : 250, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the subscription which the customer wants to cancel.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nis automatically changed to succeeded\n. 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\nstate and change its state to acknowledged\n.

Note:\nThe hosted page status must be succeeded for this API call to be allowed.

", "operationId" : "acknowledge_a_hosted_page", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:(?: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "hosted-page-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/hosted-page-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nThis 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.\n\nCustomer 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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for this payment.\n", "maxLength" : 40, "example" : null } }, "required" : [ "payment_source_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 pagecontent attribute constituents
checkout_new
    \n
  • customer: the object representing the details of the Customer for whom the subscription was created.
  • \n
  • subscription: the new Subscription object created.
  • \n
  • card: the Card object if the payment method type used was card.
  • \n
  • invoice: the Invoice object, if an invoice was generated.
  • \n
checkout_existing
    \n
  • customer: the object representing the details of the Customer whose subscription was changed.
  • \n
  • subscription: the updated Subscription object created.
  • \n
  • card: the Card object if the payment method type used was card.
  • \n
  • invoice: the Invoice object, if an invoice was generated for the subscription change.
  • \n
update_payment_method
    \n
  • customer: the object representing the details of the Customer whose subscription was changed.
  • \n
  • card: the Card object if the new payment method added was of type card.
  • \n
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.

    \n
  • If the bypass flag is false, you should route the end-customers to the hosted page URL.\nNote: Retention is currently in beta. To enable Retention, Contact Support.
  • \n
collect_now
    \n
  • transactions: this object should contain a list of\ntransactions triggered from the collect_now\nhosted 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.
  • \n
  • 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.
  • \n
", "operationId" : "retrieve_a_hosted_page", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "hosted-page-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/hosted-page-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Use one of the following methods to open the hosted page:

Do not embed the hosted page in your own iframe.

", "operationId" : "manage_payment_sources", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the [business entity](/docs/api/business_entities) of this hosted page. This is always the same as the business entity of the customer.\n", "maxLength" : 50, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "URL to redirect after payment method is added.\n", "maxLength" : 250, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Resource object representing hosted_page

" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the current subscription details like its status, next billing date, and so on.\n\n**estimate.invoice_estimate**\nhas details of the invoice that will be generated at the next billing date. \nThe generated invoice estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html)\n, 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*\n. \nTo exclude the [delayed charges](https://www.chargebee.com/docs/charges.html)\nfrom the invoice estimate, specify 'false' for the parameter *include_delayed_charges*\n.\n\n**Note:**\n\n* 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.\n* For 'Non Renewing' subscriptions, only the [delayed charges](https://www.chargebee.com/docs/charges.html) will be included in the invoice estimate.\n* This API is not supported for 'Cancelled' subscriptions.\n* 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.\n", "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null } }, { "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", "default" : true, "deprecated" : false, "example" : null } }, { "name" : "ignore_scheduled_cancellation", "in" : "query", "description" : "if true, ignores scheduled cancellation for non renewing subscription.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, { "name" : "ignore_scheduled_changes", "in" : "query", "description" : "If true, ignores all recurring charges scheduled during renewal.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, { "name" : "exclude_tax_type", "in" : "query", "description" : "Indicates whether tax calculation should be excluded for the operation. This attribute is applicable only when a third-party tax provider is configured. If no such provider is set up, this parameter will be ignored.\n\\* exclusive -\n\nExcludes only **exclusive** tax calculations, and only when exclusive taxes are applicable.\n\\* none -\n\nNo exclusions are applied. All applicable taxes are calculated based on the standard tax configuration.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "exclusive", "none" ], "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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]|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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Note:\nEstimate operations do not make any changes in Chargebee; hence this API does not create an actual customer\nor subscription\nrecord.

The response contains one or more of the following objects:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles)\nis used.\n", "minimum" : 0, "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "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.\nThe default value is as per the site settings\n.

\n

Note:\ninvoice_immediately\nonly 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

.

", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\ntaxes\nand\nline_item_taxes\nare 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.

", "example" : null }, "client_profile_id" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n", "maxLength" : 50, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\nSet it to 0\nto have no trial period.

", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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:

\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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.\n", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "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/v2/pcv-1/plans/create-a-plan#period_unit)\nattribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id)\nchosen.\n\\* year -\n\nCharge based on year(s)\n\\* day -\n\nCharge based on day(s)\n\\* month -\n\nCharge based on month(s)\n\\* week -\n\nCharge based on week(s)\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "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)\nhas 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.\n\\* activate_subscription -\n\nThe subscription activates and charges are raised for non-metered items.\n\\* cancel_subscription -\n\nThe subscription cancels.\n\\* plan_default -\n\nThe action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n\\* site_default -\n\nThis is the default value. The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true\nthen the Reverse Charge Mechanism\nis applicable. This field is applicable only when Australian GST is configured for your site.

", "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "

Specifies if the customer is liable for tax

\n* exempt - \n* taxable -

Computes tax for the customer based on the site configuration.\nIn 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.

", "enum" : [ "taxable", "exempt" ], "example" : null }, "entity_code" : { "type" : "string", "deprecated" : false, "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)\n.\n\\* med2 -\n\nUS Medical Device Excise Tax with taxable sales tax\n\\* med1 -\n\nUS Medical Device Excise Tax with exempt sales tax\n\\* b -\n\nState government\n\\* c -\n\nTribe/Status Indian/Indian Band\n\\* a -\n\nFederal government\n\\* f -\n\nReligious organization\n\\* g -\n\nResale\n\\* d -\n\nForeign diplomat\n\\* e -\n\nCharitable or benevolent organization\n\\* j -\n\nDirect pay permit\n\\* k -\n\nDirect mail\n\\* h -\n\nCommercial agricultural production\n\\* i -\n\nIndustrial production/manufacturer\n\\* n -\n\nLocal government\n\\* l -\n\nOther or custom\n\\* m -\n\nEducational organization\n\\* r -\n\nNon-resident\n\\* p -\n\nCommercial aquaculture\n\\* q -\n\nCommercial Fishery\n", "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "exempt_number" : { "type" : "string", "deprecated" : false, "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)\n.\n", "maxLength" : 100, "example" : null }, "exemption_details" : { "type" : "array", "deprecated" : false, "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)\nintegration.\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.\n", "items" : { "example" : null }, "example" : null }, "customer_type" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* business -\n\nWhen the purchase is made at a place of business\n\\* residential -\n\nWhen the purchase is made by a customer for home use\n\\* industrial -\n\nWhen the purchase is made by an industrial business\n\\* senior_citizen -\n\nWhen 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\n", "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis 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-object#price)\nis 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/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/estimates)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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/payment_schedules" : { "post" : { "summary" : "Create a payment schedule estimate", "description" : "Generates an estimate without creating a payment schedule. This endpoint can be called when you want to preview details of a new payment schedule before actually creating one.\n", "operationId" : "estimates_for_payment_schedules", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "scheme_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier for the payment_schedule_scheme.\nThis identifier is used to retrieve the payment schedule scheme, which is then applied to calculate the amount and date for the specified number of payment schedules.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Defines the payment schedule amount set for an invoice. If this is not provided, the total invoice.amount_due\nis used. This value is mandatory in case invoice_id\nis not provided.

", "minimum" : 0, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the invoice.\n", "example" : null }, "payment_schedule_start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date from which the payment schedule will start. This is applicable only when invoice_id is not provided. If invoice_id\nis provided, we will consider invoice.due_date\n.

", "example" : null } }, "required" : [ "scheme_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "Creates an estimate for [canceling](/docs/api/subscriptions/cancel-subscription-for-items) the specified subscription.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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])?[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "cancel_option" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Determines when to cancel the subscription.

\n
If the subscription has a contract term:
\n

This parameter is not applicable.

\n* end_of_billing_term -

This is used to cancel a subscription either at the end of the advance term, if it's billed for future renewals or at the end of its current billing cycle

\n* end_of_term -

This is used to cancel a subscription at the end of the current billing cycle

\n* immediately -

This is used to cancel the subscription with immediate effect

\n* specific_date -

This is used to cancel a subscription on a specified date. The change occurs as of the date/time defined in cancel_at

", "enum" : [ "immediately", "end_of_term", "specific_date", "end_of_billing_term" ], "example" : null }, "end_of_term" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

(Deprecated) Use cancel_option instead.\nApplicable only when the subscription does not have contract terms.\nSet 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.

", "example" : null }, "cancel_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies the date and time when the subscription should be canceled. Do not use this parameter when end_of_term is set to true.

\n
If the subscription has a contract term:
\n

Applicable only when contract_term_cancel_option is specific_date. Specifies the date and time to cancel the subscription and contract term.

\n
Backdating
\n

You can set a past date to backdate the cancellation. Backdating is allowed only if the following conditions are met:

\n", "example" : null }, "credit_option_for_current_term_charges" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies how to handle credits for current term charges when canceling immediately (i.e., cancel_option is immediately). If not specified, the site-level setting is used.

\n
If the subscription has a contract term:
\n

Specifies how to handle credits for current term charges when contract_term_cancel_option is terminate_immediately. If not specified, the site-level setting is used.

\n* none -

No credits notes are created.

\n* full -

Credits are issues for the full value of the current term charges.

\n* prorate -

Prorated credits are issued.

", "enum" : [ "none", "prorate", "full", "consumption_based" ], "example" : null }, "unbilled_charges_option" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies how to handle unbilled charges when canceling immediately (i.e., cancel_option is immediately). If not specified, the site-level setting is used.

\n
If the subscription has a contract term:
\n

Specifies how to handle unbilled charges when contract_term_cancel_option is terminate_immediately. If not specified, the site-level setting is used.

\n* invoice -

An invoice is generated immediately with the unbilled charges.

\n* delete -

The unbilled charges are deleted.

", "enum" : [ "invoice", "delete" ], "example" : null }, "account_receivables_handling" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies how to handle past due invoices when canceling immediately (i.e., cancel_option is immediately). If not specified, the site-level setting is used.

\n
If the subscription has a contract term:
\n

Specifies how to handle past due invoices when contract_term_cancel_option is terminate_immediately. If not specified, the site-level setting is used.

\n* no_action -

No action is taken.

\n* write_off -

Applies excess payments and refundable credits to past due invoices. Any remaining balance is written off.\nNote: The credit note for the write-off is not included in the API response.

\n* schedule_payment_collection -

Applies excess payments and refundable credits to past due invoices. If any amount remains and auto_collection\nis on\n, the remaining amount is automatically charged to the available payment method.

", "enum" : [ "no_action", "schedule_payment_collection", "write_off" ], "example" : null }, "refundable_credits_handling" : { "type" : "string", "deprecated" : false, "description" : "
If the subscription does not have a contract term:
\n

Specifies how to handle refundable credits when canceling immediately (i.e., cancel_option is immediately). If not specified, the site-level setting is used.

\n
If the subscription has a contract term:
\n

Specifies how to handle refundable credits when contract_term_cancel_option is terminate_immediately. If not specified, the site-level setting is used.

\n* schedule_refund -

Refunds remaining credits after applying them to any past due invoices.

\n* no_action -

No action is taken.

", "enum" : [ "no_action", "schedule_refund" ], "example" : null }, "contract_term_cancel_option" : { "type" : "string", "deprecated" : false, "description" : "

Required when the subscription has a contract term. Determines when to cancel the subscription along with the contract term.

\n* terminate_immediately -

Cancels the subscription and contract term immediately. Sets the contract term's status to terminated and collects any termination fee, if applicable.\nTo specify the termination fee, include a single object in the subscription_items array. If not specified, the default termination fee is applied (if configured).

\n* end_of_contract_term -

Prevents the contract term from renewing and schedules the subscription for cancellation at the end of the contract term.

\n* specific_date -

Cancels the subscription and contract term on the date specified by cancel_at. Sets action_at_term_end to cancel.\nNote: Contact Chargebee Support to enable this option for your Chargebee site.

\n* end_of_subscription_billing_term -

Cancels the subscription and contract term at the end of the current billing cycle. Sets action_at_term_end to cancel.\nNote: Contact Chargebee Support to enable this option for your Chargebee site.

", "enum" : [ "terminate_immediately", "end_of_contract_term", "specific_date", "end_of_subscription_billing_term" ], "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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\nis true\n, 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\nand line_item_taxes\nare computed based on the tax\nconfiguration as of invoice_date.\nWhen passing this parameter, the following prerequisites must be met:

\n", "example" : null }, "include_cancellation_day_in_billing" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the cancellation day is included in the billing period when prorated credits are issued for the current term charges.\nSet to true to bill the customer for the cancellation day (the term ends on the cancellation date), or false to exclude it (the term ends the day before). If not specified, the site-level setting is used.\nThis parameter is applicable only for sites using Day-Based Billing, when:

\n\n

Note: Passing this parameter in any other scenario results in a validation error.

", "example" : null }, "cancel_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "

The unique id\nof the charge item_price that represents the termination fee.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity associated with the termination fee. Applicable only when the item_price for the termination charge is quantity-based.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The termination fee. In case it is quantity-based, this is the fee per unit.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis 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-object#price)\nis 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/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the termination fee-expressed in days-starting from the current date.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "subscription_items" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n**estimate.invoice_estimate**\nhas 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\nAn \"in-term resumption\" is when the resumption happens within the billing term of the subscription.\n\n**estimate.next_invoice_estimate**\nhas 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. \nThe generated invoice_estimate/next_invoice_estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html)\n, 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "resume_option" : { "type" : "string", "deprecated" : false, "description" : "List of options to resume the subscription.\n\\* immediately -\n\nResume immediately\n\\* specific_date -\n\nResume on a specific date\n", "enum" : [ "immediately", "specific_date" ], "example" : null }, "charges_handling" : { "type" : "string", "deprecated" : false, "description" : "Applicable when charges get added during this operation and **resume_option**\nis set as 'immediately'. Allows to raise invoice immediately or add them to unbilled charges.\n\\* add_to_unbilled_charges -\n\nAdd to unbilled charges\n\\* invoice_immediately -\n\nInvoice immediately\n", "enum" : [ "invoice_immediately", "add_to_unbilled_charges" ], "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nYou can optionally override the line item name and description displayed on the invoice for charge-item prices and one-time charges. These overrides are reflected in the returned invoice estimate.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]))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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the invoice amount.\n", "maxLength" : 3, "example" : null }, "invoice_note" : { "type" : "string", "deprecated" : false, "description" : "A note for this particular invoice. This, and [all other notes](/docs/api/invoices/invoice-object#notes)\nfor the invoice are displayed on the PDF invoice sent to the customer.\n", "maxLength" : 2000, "example" : null }, "remove_general_note" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Set as true\nto remove the general note\nfrom this invoice.

", "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "authorization_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "Authorization transaction to be captured.\n", "maxLength" : 40, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for this payment.\n", "maxLength" : 40, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "The customer level auto collection will be override if specified.\n\\* on -\n\nWhenever an invoice is created, an automatic attempt will be made to charge.\n\\* off -\n\nWhenever an invoice is created as payment due.\n", "enum" : [ "on", "off" ], "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\ntaxes\nand\nline_item_taxes\nare 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.

", "example" : null }, "invoice" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for which this invoice needs to be created.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "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)\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "item_prices" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_prices\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "A unique ID for your system to identify the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Item price quantity\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price or per-unit-price of the item price. By default, it is the value set\nfor the item_price.\nThis is only applicable when the pricing_model\nof the item_price\nis flat_fee\nor per_unit.\nThe value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the item starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the item ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "The line item name to display on the invoice for this charge item. \n**Default value**\n\n* The invoice name defined for the item in the product catalog.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "entity_description" : { "type" : "array", "description" : "Descriptive text displayed below the line item name on the invoice for this charge item. \n**Default value**\n\n* The [item price description](/docs/api/item_prices/item_price-object#description) from the product catalog.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price to which this tier belongs.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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 ).\nProvide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "The name of this one-time charge as displayed on the invoice line item.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "taxable" : { "type" : "array", "description" : "The amount to be charged is taxable or not.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "tax_profile_id" : { "type" : "array", "description" : "Tax profile of the charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "hsn_code" : { "type" : "array", "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "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)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* retail -\n\nTransaction is a sale to an end user\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the charge starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the charge ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "entity_description" : { "type" : "array", "description" : "Descriptive text for this one-time charge displayed on the invoice, shown below the line item name.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "example" : null } }, "example" : null }, "notes_to_remove" : { "type" : "object", "deprecated" : false, "description" : "Parameters for notes_to_remove\n", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Type of entity to which the note\nbelongs. To remove the general note, use the remove_general_note\nparameter.

\n* addon_item_price -

Indicates that this line item is based on addon Item Price

\n* charge_item_price -

Indicates that this line item is based on charge Item Price

\n* plan_item_price -

Indicates that this line item is based on plan Item Price

\n* customer -

Entity that represents a customer.

\n* subscription -

Entity that represents a subscription of customer.

\n* coupon -

Entity that represents a coupon.

", "enum" : [ "customer", "subscription", "coupon", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "Unique identifier of the [note](/docs/api/invoices/invoice-object#notes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "apply_on" ], "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "gift" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift\n", "properties" : { "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately.\n", "example" : null }, "auto_claim" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

When true\n, the claim happens automatically. When not passed, the default value in the site settings is used.

", "example" : null }, "no_expiry" : { "type" : "boolean", "deprecated" : false, "description" : "

When true\n, indicates that the gift does not expire. Do not pass or pass as false\nwhen auto_claim\nis set.

", "example" : null }, "claim_expiry_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date until which the gift can be claimed. Must be set to a value after scheduled_at.\nIf the gift is not claimed within claim_expiry_date\n, it will expire and the subscription will move to cancelled\nstate. When not passed, the value specified in the site settings will be used.\nPass as NULL\nor do not pass when auto_claim\nor no_expiry\nare set.

", "example" : null } }, "example" : null }, "gifter" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gifter\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Gifter customer id.\n", "maxLength" : 50, "example" : null }, "signature" : { "type" : "string", "deprecated" : false, "description" : "Gifter sign-off name\n", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "Personalized message for the gift.\n", "maxLength" : 500, "example" : null }, "payment_src_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the payment source\n", "maxLength" : 40, "example" : null } }, "required" : [ "customer_id", "signature" ], "example" : null }, "gift_receiver" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift_receiver\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Receiver customer id.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the receiver as given by the gifter.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the receiver as given by the gifter,\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the receiver. All gift related emails are sent to this email.\n", "maxLength" : 70, "example" : null } }, "required" : [ "customer_id", "email", "first_name", "last_name" ], "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "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.\n\\* card -\n\ncard\n\\* twint -\n\nPayments made via Twint\n\\* swish -\n\nPayments made via Swish\n\\* dotpay -\n\ndotpay\n\\* faster_payments -\n\nFaster Payments\n\\* upi -\n\nupi\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* klarna -\n\nPayments made via Klarna.\n\\* payme -\n\nPayments made via PayMe\n\\* go_pay -\n\nPayments made via GoPay\n\\* google_pay -\n\ngoogle_pay\n\\* trustly -\n\nTrustly\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* pix -\n\nPix\n\\* venmo -\n\nVenmo\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* alipay -\n\nPayments made via Alipay.\n\\* tamara -\n\nPayments made via Tamara.\n\\* ideal -\n\nideal\n\\* pay_to -\n\nPayTo\n\\* boleto -\n\nboleto\n\\* pay_co -\n\nPayments made via PayCo\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* paypay -\n\nPayPay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* direct_debit -\n\ndirect_debit\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* bancontact -\n\nbancontact\n\\* pay_by_bank -\n\nPay By Bank\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* apple_pay -\n\napple_pay\n\\* qpay -\n\nPayments made via Qpay.\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* gcash -\n\nPayments made via GCash.\n\\* giropay -\n\ngiropay\n\\* sofort -\n\nsofort\n\\* amazon_payments -\n\nAmazon Payments\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* dana -\n\nPayments made via Dana.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. The value is interpreted as per the type of currency.

\n

Prerequisites

\n

Default value

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "

The price/per unit price of the item in major units of the currency. When not provided, the value set for the item price is used.

\n

Prerequisites

\n

Default value

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "

The lowest value in the quantity tier.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "

The highest value in the quantity tier.

\n

Constraints

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/currencies).\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "starting_unit_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the lowest value of quantity in this tier.

\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "ending_unit_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the highest value of quantity in this tier.

\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "\n

Constraints

\n

Prerequisite

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "gift" : { "style" : "deepObject", "explode" : true }, "gift_receiver" : { "style" : "deepObject", "explode" : true }, "gifter" : { "style" : "deepObject", "explode" : true }, "item_tiers" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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,

The following conditions must be met or tax calculation is ignored:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.

\n

Constraints

\n

Backdated changes\nchanges_scheduled_atcan 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:

", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the effective date for the subscription change.

\n* end_of_term -

The change is carried out at the end of the current billing cycle of the subscription.

\n* specific_date -

Executes the change on a specified date. The change occurs as of the date/time defined in changes_scheduled_at.

\n* immediately -

The change is carried out immediately.

", "enum" : [ "immediately", "end_of_term", "specific_date" ], "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_items_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

If true\nthen the existing subscription_items\nlist for the subscription is replaced by the one provided. If false\nthen the provided subscription_items\nlist gets added to the existing list.

", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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\nis set to true\n, 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.\nWhen passing this parameter, the following prerequisites must be met:

\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Billing cycles set for plan-item price is used by default.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles to invoice in advance.\nIf a new term is started for the subscription due to this API call, then terms_to_charge\nis inclusive of this new term. See description for the force_term_reset\nparameter to learn more about when a subscription term is reset.

", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

If the subscription status\nis cancelled\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\nNote:\nIt is recommended not to pass this parameter along with changed_scheduled_at.\nreactivate_from\ncan 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", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

If true\nthen the existing coupon_ids\nlist for the subscription is replaced by the one provided. If false\nthen the provided list gets added to the existing coupon_ids\n.

", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "\n

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

", "example" : null }, "end_of_term" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Deprecated

\n

Set this to true if you want the update to be applied at the end of the current subscription billing cycle.

", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "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\nwill have the subscription reset its term to the current date (provided end_of_term\nis false).\nNote:\nWhen 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.

", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "description" : "

Applicable only for cancelled\nsubscriptions. When passed as true\n, the canceled subscription is activated; otherwise subscription changes are made without changing its status.\nIf not passed, subscription will be activated only if subscription_items\nis passed.

", "example" : null }, "include_delayed_charges" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If true, all the unbilled charges will be included for the invoice estimate.\n", "example" : null }, "use_existing_balances" : { "type" : "boolean", "default" : true, "deprecated" : false, "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*\n.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "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.\nThe default value is as per the site settings\n.

\n

Note:\ninvoice_immediately\nonly 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

.

", "example" : null }, "invoice_usages" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Setting this attribute to true will invoice the overages for the metered item during subscription changes\n.

", "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The new start date of a future\nsubscription. Applicable only for future\nsubscriptions.

", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription status\nis future\n, in_trial\n, or cancelled.\nAlso, the value must not be earlier than changes_scheduled_at\nor start_date.\nNote:\nThis parameter can be backdated (set to a value in the past) only when the subscription is in cancelled\nor in_trial\nstatus.\nDo this to keep a record of when the trial ended in case it ended at some point in the past. When trial_end\nis backdated, the subscription immediately goes into active\nor non_renewing\nstatus.

", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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.\n", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "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/v2/pcv-1/plans/create-a-plan#period_unit)\nattribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id)\nchosen.\n\\* year -\n\nCharge based on year(s)\n\\* day -\n\nCharge based on day(s)\n\\* month -\n\nCharge based on month(s)\n\\* week -\n\nCharge based on week(s)\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "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)\nhas 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.\n\\* activate_subscription -\n\nThe subscription activates and charges are raised for non-metered items.\n\\* cancel_subscription -\n\nThe subscription cancels.\n\\* plan_default -\n\nThe action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n\\* site_default -\n\nThis is the default value. The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null } }, "required" : [ "id" ], "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true\nthen the Reverse Charge Mechanism\nis applicable. This field is applicable only when Australian GST is configured for your site.

", "example" : null } }, "example" : null }, "billing_override" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_override\n", "properties" : { "max_excess_payment_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of excess payments that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n", "minimum" : -1, "example" : null }, "max_refundable_credits_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of refundable credits that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n", "minimum" : -1, "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "

When price overriding\nis enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing\nis enabled. If changes_scheduled_at\nis in the past and a unit_price_in_decimal\nis 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" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "proration_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Note\nApplicable only for item prices with:

\n

Specifies 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.

\n

Note:\nIf you don't provide a value, Chargebee determines the proration logic based on the following precedence: this parameter > prorate\nparameter > item_price.proration_type

\n

site-wide proration\nsetting.

\n
\n\n* none -

Don't apply any charges or credits for the addon.

\n* partial_term -

Prorate the charges or credits for the rest of the current term.

\n* full_term -

Charge the full price of the addon or give the full credit. Don't apply any proration.

", "enum" : [ "full_term", "partial_term", "none" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "operation_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be carried out for the discount.

\n\n* add -

The discount is attached to the subscription.

\n* remove -

The discount (given by discounts[id]\n) is removed from the subscription. Subsequent invoices will no longer have the discount applied. Tip:\nIf you want to replace a discount, remove\nit and add\nanother in the same API call.

", "enum" : [ "add", "remove" ], "example" : null }, "example" : null }, "id" : { "type" : "array", "description" : "An immutable unique id for the discount. It is always auto-generated.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "duration_type", "operation_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/estimates)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "billing_override" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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).\n\nIn the response:\n\n* **estimate.invoice_estimates\\[\\]** has details of the invoices scheduled to be generated.\n\n**Note:** If *consolidated invoicing* is enabled you may use this API to test whether upcoming renewals are consolidated.\n", "operationId" : "upcoming_invoices_estimate", "parameters" : [ { "name" : "include_usage_charges", "in" : "query", "description" : "

When set to true, the invoice_estimates[] returned in the response includes usage-based line items, if any. These are invoice_estimates[].line_items[] where line_items[].metered is true.

\n

See also:

\nPricing for usage-based line items.

", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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:

Response

Returns an estimate object with one of the following components depending on the value of invoice_immediately.

", "operationId" : "regenerate_invoice_estimate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the period being invoiced. The default value is [current_term_start](/docs/api/subscriptions/subscription-object#current_term_start)\n.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the period being invoiced. The default value is [current_term_end](/docs/api/subscriptions/subscription-object#current_term_end)\n.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "

Whether the charges should be prorated according to the term specified by date_from\nand date_to.\nShould not be passed without date_from\nand date_to\n.

", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "

Only applicable when Consolidated Invoicing\nis enabled for the customer. Set to false\nto leave the current term charge for the subscription as unbilled.\nOnce you have done this for all suitable subscriptions of the customer, call Create an invoice for unbilled charges\nto invoice them.

", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

The following conditions must be met or tax calculation is ignored:

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "use_existing_balances" : { "type" : "boolean", "default" : true, "deprecated" : false, "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*\n.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "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.\nThe default value is as per the site settings\n.

\n

Note:\ninvoice_immediately\nonly 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

.

", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles)\nis used.\n", "minimum" : 0, "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\ntaxes\nand\nline_item_taxes\nare 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.

", "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\nSet it to 0\nto have no trial period.

", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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:

\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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.\n", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "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/v2/pcv-1/plans/create-a-plan#period_unit)\nattribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id)\nchosen.\n\\* year -\n\nCharge based on year(s)\n\\* day -\n\nCharge based on day(s)\n\\* month -\n\nCharge based on month(s)\n\\* week -\n\nCharge based on week(s)\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "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)\nhas 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.\n\\* activate_subscription -\n\nThe subscription activates and charges are raised for non-metered items.\n\\* cancel_subscription -\n\nThe subscription cancels.\n\\* plan_default -\n\nThe action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n\\* site_default -\n\nThis is the default value. The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "billing_override" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_override\n", "properties" : { "max_excess_payment_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of excess payments that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n", "minimum" : -1, "example" : null }, "max_refundable_credits_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of refundable credits that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n", "minimum" : -1, "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis 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-object#price)\nis 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/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/estimates)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "billing_override" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the subscription details like the status of the subscription (in_trial, active, etc.), next billing date, and so on.\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 when\n * *prorate* parameter is false, or\n * *invoice_immediately* parameter is false, or\n * subscription is in *in-trial* state\n* **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.\n* **estimate.unbilled_charge_estimates\\[\\]** has details of the unbilled charges. This is returned only if *invoice_immediately* is set as false.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "term_ends_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the current term should end for this subscription.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "Applicable for *active*\n/ *non_renewing*\nsubscriptions. If specified as *true*\nprorated charges / credits will be added during this operation.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "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.\nThe default value is as per the site settings\n.

\n

Note:\ninvoice_immediately\nonly 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

.

", "example" : null } }, "required" : [ "term_ends_at" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 operation. It returns attributes such as pause_date and resume_date. This is similar to the Pause a subscription API with the exception that the subscription is not paused. Only an estimate for this operation is created.

In the response,

", "operationId" : "pause_subscription_estimate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2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?:(?: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "pause_option" : { "type" : "string", "deprecated" : false, "description" : "

List of options to pause the subscription.

\n* 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

\n* immediately -

Pause immediately

\n* end_of_term -

Pause at the end of current term

\n* specific_date -

Pause on a specific date

", "enum" : [ "immediately", "end_of_term", "specific_date", "billing_cycles" ], "example" : null }, "unbilled_charges_handling" : { "type" : "string", "deprecated" : false, "description" : "

Applicable when unbilled charges are present for the subscription and 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.

\n* invoice -

Invoice charges\nIf 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.

\n* no_action -

Retain as unbilled\nIf no_action is chosen, charges are added to the resumption invoice.

", "enum" : [ "no_action", "invoice" ], "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

When a pause has been scheduled, it is the date/time of scheduled pause. When the subscription is in the paused\nstate, it is the date/time when the subscription was paused.

", "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\n", "example" : null }, "skip_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles this subscription should be paused. The subscription resumes after the paused billing cycles end.\n", "minimum" : 1, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "advance_invoice_estimate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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} }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "terms_to_charge" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "", "minimum" : 1, "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "

Whether the charge should be invoiced immediately or added to unbilled_charges.\nApplicable only when schedule_type\nis immediate\n.

", "example" : null }, "schedule_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of advance invoice or advance invoicing schedule.

\n* immediate -

Charge immediately for the number of billing cycles specified by terms_to_charge\n.

\n* specific_dates -

Charge on specific dates.\nFor each date, specify the number of billing cycles\nto charge for. Up to 5 dates can be configured.

\n* fixed_intervals -

Charge at fixed intervals of time. Specify the number of billing cycles\nthat constitute an interval and the number of days before each interval\nthat the invoice should be generated. Also specify when the schedule should end\n.

", "enum" : [ "immediate", "specific_dates", "fixed_intervals" ], "example" : null }, "fixed_interval_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for fixed_interval_schedule\n", "properties" : { "number_of_occurrences" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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\nof the subscription. This parameter is applicable only when fixed_interval_schedule[end_schedule_on]\n= after_number_of_intervals

", "minimum" : 1, "example" : null }, "days_before_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before each interval that advance invoices are generated.\n", "minimum" : 1, "example" : null }, "end_schedule_on" : { "type" : "string", "deprecated" : false, "description" : "

Specifies when the schedule should end.

\n* after_number_of_intervals -

Advance invoices are generated a specified number of times

\n* subscription_end -

Advance invoices are generated for as long as the subscription is active.

\n* specific_date -

End the advance invoicing schedule on a specific date\n.

", "enum" : [ "after_number_of_intervals", "specific_date", "subscription_end" ], "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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]\n= specific_date\n.

", "example" : null } }, "example" : null }, "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for specific_dates_schedule\n", "properties" : { "terms_to_charge" : { "type" : "array", "description" : "

The number of billing cycles to charge for, on the date specified. Applicable only when schedule_type\nis specific_dates.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "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\nis specific_dates\n.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "fixed_interval_schedule" : { "style" : "deepObject", "explode" : true }, "specific_dates_schedule" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The quote name will be used as the pdf name of the quote.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles)\nis used.\n", "minimum" : 0, "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "

The list of IDs of the coupons to be applied. Coupon codes are also supported.

\n

Note

Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "billing_start_option" : { "type" : "string", "default" : "on_specific_date", "deprecated" : false, "description" : "When the quote is converted, this attribute determines the date/time as of when the subscription start is to be carried out. \n**Note**\n\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n\\* on_specific_date -\n\nUpon quote conversion, the subscription is scheduled to start on the specified date.\n\\* immediately -\n\nThe subscription starts immediately upon conversion of the quote to a subscription.\n", "enum" : [ "immediately", "on_specific_date" ], "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\nSet it to 0\nto have no trial period.

", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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:

\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The period of time by which the first term of the subscription is extended free of charge. The value is expressed in the time unit specified by free_period_unit. For example, 3 with free_period_unit = month adds 3 free months to the first term of the subscription.

\n

Prerequisite

\nCan be used only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The time unit for free_period.

\n

Prerequisite

\nCan be used only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.\n

Constraint

\nMust be equal to or lower than the period_unit of the plan item price of the subscription.

\n* year -

Charge based on year(s)

\n* day -

Charge based on day(s)

\n* month -

Charge based on month(s)

\n* week -

Charge based on week(s)

", "enum" : [ "day", "week", "month", "year" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "

The first name of the billing contact.

\n

Note

The parameter billing_address and all its sub-parameters apply only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis 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-object#price)\nis 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/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 2000, "example" : null }, "example" : null }, "ramp_tier_id" : { "type" : "array", "description" : "

The index or identifier of the ramp to which the item price belongs. Use this index to map item_tier values to the correct ramp, as the target item_price of an item_tier may be part of multiple ramps.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the quote to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/quotes)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ramp_tier_id" : { "type" : "array", "description" : "

The index or identifier of the ramp to which this tier information belongs. This must be a value from the subscription_items[ramp_tier_id][i]. Since an item price can be part of multiple subscriptions ramps, this group ID specifies the ramp to which this tier information belongs.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null }, "example" : null } }, "example" : null }, "coupons" : { "type" : "object", "deprecated" : false, "description" : "", "properties" : { "id" : { "type" : "array", "description" : "The [ID](/docs/api/coupons/coupon-object#id) of the coupon to be applied. [Coupon codes](/docs/api/coupon_codes) are not supported. \n**Note**\n\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the coupon. The period of the coupon, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the coupon. The period of the coupon, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "entitlement_overrides" : { "type" : "object", "deprecated" : false, "description" : "The set of entitlement overrides to apply on this quote. Each entry targets a feature for an entity on the quote. Overrides are always upserted.\n", "properties" : { "feature_id" : { "type" : "array", "description" : "

The id of the feature for which the entitlement override is being set.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "

The id of the entity on the quote (for example, a plan_price, addon_price, or charge_price handle from the quote context) whose entitlement is being overridden.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of the entity on the quote for which the entitlement override is being set.

\n* plan_price -

Indicates that the entity is an item_price with item_type set to plan.

\n* charge_price -

Indicates that the entity is an item_price with item_type set to charge.

\n* addon_price -

Indicates that the entity is an item_price with item_type set to addon.

", "enum" : [ "plan_price", "addon_price", "charge_price" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "is_enabled" : { "type" : "array", "description" : "

Specifies whether the entitlement for the feature is enabled (true) or disabled (false) for the entity on the quote.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Start date (UTC timestamp) of the entitlement override for the item on the quote. Used with end_date for ramp-scoped entitlements.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

End date (UTC timestamp) of the entitlement override for the item on the quote. Used with start_date for ramp-scoped entitlements.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "coupons" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "entitlement_overrides" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_quote", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "

Resource object representing quoted_charge

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_quote_status", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "status" : { "type" : "string", "deprecated" : false, "description" : "The status to which the quote should be updated.\n\\* accepted -\n\nThe customer has accepted the quote.\n\\* closed -\n\nThe quote has been marked as closed. \n**Note**\n\nNot applicable when Chargebee CPQ is enabled.\n\\* declined -\n\nThe customer declined/rejected the quote.\n\\* proposed -\n\nThe quote has been shared with the customer via email or e-signature and is awaiting their response. \n**Note**\n\nApplicable only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n\\* voided -\n\nThe quote has been invalidated and can no longer be acted upon. \n**Note**\n\nApplicable only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "enum" : [ "accepted", "declined", "proposed", "voided", "closed" ], "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto 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](/docs/api/hosted_pages)\nor any document such as the [Quote PDF](/docs/api/quotes/retrieve-quote-as-pdf)\n.\n", "maxLength" : 300, "example" : null } }, "required" : [ "status" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "

Resource object representing quoted_charge

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "extend_expiry_date", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quote will be valid till this date. After this date quote will be marked as closed.\n", "example" : null } }, "required" : [ "valid_till" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "

Resource object representing quoted_charge

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Edits a quote for updating a subscription.

\n

Impacts

Quote and related resources

If the quote is for a scheduled change, then the following resources are updated:

For more details, see Ramps API compatibility mode.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_items_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

If true\nthen the existing subscription_items\nlist for the subscription is replaced by the one provided. If false\nthen the provided subscription_items\nlist gets added to the existing list.

", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Billing cycles set for plan-item price is used by default.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles to invoice in advance.\nIf a new term is started for the subscription due to this API call, then terms_to_charge\nis inclusive of this new term. See description for the force_term_reset\nparameter to learn more about when a subscription term is reset.

", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

If the subscription status\nis cancelled\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\nNote:\nIt is recommended not to pass this parameter along with changed_scheduled_at.\nreactivate_from\ncan 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", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "

The list of IDs of the coupons to be applied. Coupon codes are also supported.

\n

Note

Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Should be true if the existing coupons should be replaced with the ones that are being passed.\n", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "

When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.

\n* specific_date -

The change is carried out as of the date specified under changes_scheduled_at\n.

\n* immediately -

The change is carried out immediately.

", "enum" : [ "immediately", "specific_date" ], "example" : null }, "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.

\n

Constraints

\n

Backdated changes\nchanges_scheduled_atcan 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:

", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "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**:\nSpecifying this value as 'false' has no impact on the default behaviour.\n", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "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.\n", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

\n

Note\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The new start date of a future\nsubscription. Applicable only for future\nsubscriptions.

", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription status\nis future\n, in_trial\n, or cancelled.\nAlso, the value must not be earlier than changes_scheduled_at\nor start_date.\nNote:\nThis parameter can be backdated (set to a value in the past) only when the subscription is in cancelled\nor in_trial\nstatus.\nDo this to keep a record of when the trial ended in case it ended at some point in the past. When trial_end\nis backdated, the subscription immediately goes into active\nor non_renewing\nstatus.

", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "

The first name of the billing contact.

\n

Note\nThe parameter billing_address and all its sub-parameters apply only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true\nthen the Reverse Charge Mechanism\nis applicable. This field is applicable only when Australian GST is configured for your site.

", "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* 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.

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "

When price overriding\nis enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing\nis enabled. If changes_scheduled_at\nis in the past and a unit_price_in_decimal\nis 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" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 2000, "example" : null }, "example" : null }, "ramp_tier_id" : { "type" : "array", "description" : "

The index or identifier of the ramp to which the item price belongs. Use this index to map item_tier values to the correct ramp, as the target item_price of an item_tier may be part of multiple ramps.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the quote to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "operation_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be carried out for the discount.

\n\n* add -

The discount is attached to the subscription.

\n* remove -

The discount (given by discounts[id]\n) is removed from the subscription. Subsequent invoices will no longer have the discount applied. Tip:\nIf you want to replace a discount, remove\nit and add\nanother in the same API call.

", "enum" : [ "add", "remove" ], "example" : null }, "example" : null }, "id" : { "type" : "array", "description" : "

The id of the discount to be removed. This parameter is only relevant when discounts[operation_type]\nis remove.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "duration_type", "operation_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/quotes)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ramp_tier_id" : { "type" : "array", "description" : "

The index or identifier of the ramp to which this tier information belongs. This must be a value from the subscription_items[ramp_tier_id][i]. Since an item price can be part of multiple subscriptions ramps, this group ID specifies the ramp to which this tier information belongs.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null }, "example" : null } }, "example" : null }, "coupons" : { "type" : "object", "deprecated" : false, "description" : "", "properties" : { "id" : { "type" : "array", "description" : "The [ID](/docs/api/coupons/coupon-object#id) of the coupon to be applied. [Coupon codes](/docs/api/coupon_codes) are not supported. \n**Note**\n\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the coupon. The period of the coupon, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the coupon. The period of the coupon, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "entitlement_overrides" : { "type" : "object", "deprecated" : false, "description" : "The set of entitlement overrides to apply on this quote. Each entry targets a feature for an entity on the quote. Overrides are always upserted.\n", "properties" : { "feature_id" : { "type" : "array", "description" : "

The id of the feature for which the entitlement override is being set.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "

The id of the entity on the quote (for example, a plan_price, addon_price, or charge_price handle from the quote context) whose entitlement is being overridden.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of the entity on the quote for which the entitlement override is being set.

\n* plan_price -

Indicates that the entity is an item_price with item_type set to plan.

\n* charge_price -

Indicates that the entity is an item_price with item_type set to charge.

\n* addon_price -

Indicates that the entity is an item_price with item_type set to addon.

", "enum" : [ "plan_price", "addon_price", "charge_price" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "is_enabled" : { "type" : "array", "description" : "

Specifies whether the entitlement for the feature is enabled (true) or disabled (false) for the entity on the quote.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Start date (UTC timestamp) of the entitlement override for the item on the quote. Used with end_date for ramp-scoped entitlements.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

End date (UTC timestamp) of the entitlement override for the item on the quote. Used with start_date for ramp-scoped entitlements.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "coupons" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "entitlement_overrides" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_quotes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\* '.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nThe quote number. Acts as a identifier for quote and typically generated sequentially.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"123\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "123", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nThe identifier of the customer this quote belongs to.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is_not\\] = \"4gmiXbsjdm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on subscription_id.\nNOTE: Not to be used if *consolidated invoicing*\nfeature is enabled.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is_not\\] = \"4gmiXbsjdm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent status of this quote. Possible values are : open, accepted, declined, invoiced, closed.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"open\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "open", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`open\\` - Open \\* \\`accepted\\` - Accepted. \\* \\`declined\\` - Declined. \\* \\`invoiced\\` - Invoiced \\* \\`closed\\` - Closed \\* \\`pending_approval\\` - Pending Approval \\* \\`approval_rejected\\` - Approval Rejected \\* \\`proposed\\` - Proposed. \\* \\`voided\\` - Voided. \\* \\`expired\\` - Expired\n", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`open\\` - Open \\* \\`accepted\\` - Accepted. \\* \\`declined\\` - Declined. \\* \\`invoiced\\` - Invoiced \\* \\`closed\\` - Closed \\* \\`pending_approval\\` - Pending Approval \\* \\`approval_rejected\\` - Approval Rejected \\* \\`proposed\\` - Proposed. \\* \\`voided\\` - Voided. \\* \\`expired\\` - Expired\n", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`open\\` - Open \\* \\`accepted\\` - Accepted. \\* \\`declined\\` - Declined. \\* \\`invoiced\\` - Invoiced \\* \\`closed\\` - Closed \\* \\`pending_approval\\` - Pending Approval \\* \\`approval_rejected\\` - Approval Rejected \\* \\`proposed\\` - Proposed. \\* \\`voided\\` - Voided. \\* \\`expired\\` - Expired\n", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "pattern" : "^\\[(open|accepted|declined|invoiced|closed|pending_approval|approval_rejected|proposed|voided|expired)(,(open|accepted|declined|invoiced|closed|pending_approval|approval_rejected|proposed|voided|expired))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`open\\` - Open \\* \\`accepted\\` - Accepted. \\* \\`declined\\` - Declined. \\* \\`invoiced\\` - Invoiced \\* \\`closed\\` - Closed \\* \\`pending_approval\\` - Pending Approval \\* \\`approval_rejected\\` - Approval Rejected \\* \\`proposed\\` - Proposed. \\* \\`voided\\` - Voided. \\* \\`expired\\` - Expired\n", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "pattern" : "^\\[(open|accepted|declined|invoiced|closed|pending_approval|approval_rejected|proposed|voided|expired)(,(open|accepted|declined|invoiced|closed|pending_approval|approval_rejected|proposed|voided|expired))*\\]$", "example" : null } } } }, { "name" : "date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nCreation date of the quote. Typically this is the date on which quote is generated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*date\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "Resource object representing quoted_ramp" } }, "required" : [ "quote" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "convert_a_quote", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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\n, 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\nand line_item_taxes\nare computed based on the tax configuration as of invoice_date.\nWhen passing this parameter, the following prerequisites must be met:

\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "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.\nThe default value is as per the site settings\n.

\n

Note:\ninvoice_immediately\nonly 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

.

", "example" : null }, "create_pending_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "

This attribute is set to true\nautomatically for the subscription when it has one or more metered\nitems. However, when there are no metered\nitems, you can pass this parameter as true\nto force all invoices (except the first) to be created as pending.\nThis is useful in the following scenarios:

\n\n

Note:

\n

.

", "example" : null }, "first_invoice_pending" : { "type" : "boolean", "default" : false, "deprecated" : false, "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

By 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 or via an API call.

\n

Note:

This parameter is passed only when there are metered items in the subscription or when create_pending_invoices is true.

\n

.

", "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Applicable only for create subscription quote.\n", "maxLength" : 50, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Applicable only for create subscription quote.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "

When auto-closing of invoices\nis enabled for the site, you can pass this parameter as false\nto prevent the automatic closing of invoices for this subscription. The value passed here takes precedence over the value stored at the customer level\n.

", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "

Resource object representing quoted_charge

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "

Resource object representing subscription

" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "

Resource object representing invoice

" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "

Resource object representing credit_note

" }, "unbilled_charges" : { "type" : "array", "description" : "

Resource object representing unbilled_charge

", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "delete_a_quote", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "

Resource object representing quoted_charge

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles)\nis used.\n", "minimum" : 0, "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "

The list of IDs of the coupons to be applied. Coupon codes are also supported.

\n

Note

Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "billing_start_option" : { "type" : "string", "default" : "on_specific_date", "deprecated" : false, "description" : "When the quote is converted, this attribute determines the date/time as of when the subscription start is to be carried out. \n**Note**\n\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n\\* on_specific_date -\n\nUpon quote conversion, the subscription is scheduled to start on the specified date.\n\\* immediately -\n\nThe subscription starts immediately upon conversion of the quote to a subscription.\n", "enum" : [ "immediately", "on_specific_date" ], "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

\n

Note\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\nSet it to 0\nto have no trial period.

", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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:

\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The period of time by which the first term of the subscription is extended free of charge. The value is expressed in the time unit specified by free_period_unit. For example, 3 with free_period_unit = month adds 3 free months to the first term of the subscription.

\n

Prerequisite

\nCan be used only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The time unit for free_period.

\n

Prerequisite

\nCan be used only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.\n

Constraint

\nMust be equal to or lower than the period_unit of the plan item price of the subscription.

\n* year -

Charge based on year(s)

\n* day -

Charge based on day(s)

\n* month -

Charge based on month(s)

\n* week -

Charge based on week(s)

", "enum" : [ "day", "week", "month", "year" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "

The first name of the billing contact.

\n

Note\nThe parameter billing_address and all its sub-parameters apply only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis 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-object#price)\nis 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/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 2000, "example" : null }, "example" : null }, "ramp_tier_id" : { "type" : "array", "description" : "

The index or identifier of the ramp to which the item price belongs. Use this index to map item_tier values to the correct ramp, as the target item_price of an item_tier may be part of multiple ramps.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the quote to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/quotes)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ramp_tier_id" : { "type" : "array", "description" : "

The index or identifier of the ramp to which this tier information belongs. This must be a value from the subscription_items[ramp_tier_id][i]. Since an item price can be part of multiple subscriptions ramps, this group ID specifies the ramp to which this tier information belongs.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null }, "example" : null } }, "example" : null }, "coupons" : { "type" : "object", "deprecated" : false, "description" : "", "properties" : { "id" : { "type" : "array", "description" : "The [ID](/docs/api/coupons/coupon-object#id) of the coupon to be applied. [Coupon codes](/docs/api/coupon_codes) are not supported. \n**Note**\n\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the coupon. The period of the coupon, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the coupon. The period of the coupon, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "entitlement_overrides" : { "type" : "object", "deprecated" : false, "description" : "The set of entitlement overrides to apply on this quote. Each entry targets a feature for an entity on the quote. Overrides are always upserted.\n", "properties" : { "feature_id" : { "type" : "array", "description" : "

The id of the feature for which the entitlement override is being set.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "

The id of the entity on the quote (for example, a plan_price, addon_price, or charge_price handle from the quote context) whose entitlement is being overridden.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of the entity on the quote for which the entitlement override is being set.

\n* plan_price -

Indicates that the entity is an item_price with item_type set to plan.

\n* charge_price -

Indicates that the entity is an item_price with item_type set to charge.

\n* addon_price -

Indicates that the entity is an item_price with item_type set to addon.

", "enum" : [ "plan_price", "addon_price", "charge_price" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "is_enabled" : { "type" : "array", "description" : "

Specifies whether the entitlement for the feature is enabled (true) or disabled (false) for the entity on the quote.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Start date (UTC timestamp) of the entitlement override for the item on the quote. Used with end_date for ramp-scoped entitlements.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

End date (UTC timestamp) of the entitlement override for the item on the quote. Used with start_date for ramp-scoped entitlements.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "coupons" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "entitlement_overrides" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Creates a quote for updating a subscription.

\n

Impacts

Quote and related resources

If the quote is for a scheduled change, then the following resources are created:

For more details, see Ramps API compatibility mode.

", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?:[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The quote name will be used as the pdf name of the quote.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "mandatory_items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "Item ids of [mandatorily attached addons](/docs/api/attached_items)\nthat are to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_items_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

If true\nthen the existing subscription_items\nlist for the subscription is replaced by the one provided. If false\nthen the provided subscription_items\nlist gets added to the existing list.

", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Billing cycles set for plan-item price is used by default.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles to invoice in advance.\nIf a new term is started for the subscription due to this API call, then terms_to_charge\nis inclusive of this new term. See description for the force_term_reset\nparameter to learn more about when a subscription term is reset.

", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

If the subscription status\nis cancelled\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\nNote:\nIt is recommended not to pass this parameter along with changed_scheduled_at.\nreactivate_from\ncan 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", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "

The list of IDs of the coupons to be applied. Coupon codes are also supported.

\n

Note

Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Should be true if the existing coupons should be replaced with the ones that are being passed.\n", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "

When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.

\n* specific_date -

The change is carried out as of the date specified under changes_scheduled_at\n.

\n* immediately -

The change is carried out immediately.

", "enum" : [ "immediately", "specific_date" ], "example" : null }, "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.

\n

Constraints

\n

Backdated changes\nchanges_scheduled_atcan 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:

", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "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**:\nSpecifying this value as 'false' has no impact on the default behaviour.\n", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "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.\n", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

\n\n

Note: This parameter applies only when Chargebee CPQ is enabled. To request access, please contact support

", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The new start date of a future\nsubscription. Applicable only for future\nsubscriptions.

", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription status\nis future\n, in_trial\n, or cancelled.\nAlso, the value must not be earlier than changes_scheduled_at\nor start_date.\nNote:\nThis parameter can be backdated (set to a value in the past) only when the subscription is in cancelled\nor in_trial\nstatus.\nDo this to keep a record of when the trial ended in case it ended at some point in the past. When trial_end\nis backdated, the subscription immediately goes into active\nor non_renewing\nstatus.

", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* bank_transfer -\n\nBank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* boleto -\n\nBoleto\n\\* no_preference -\n\nNo Preference\n\\* sepa_credit -\n\nSEPA Credit\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* custom -\n\nCustom\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* cash -\n\nCash\n\\* check -\n\nCheck\n", "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" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null } }, "required" : [ "id" ], "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "

The first name of the billing contact.

\n

Note

The parameter billing_address and all its sub-parameters apply only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true\nthen the Reverse Charge Mechanism\nis applicable. This field is applicable only when Australian GST is configured for your site.

", "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* 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.

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "subscription_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_items\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "

When price overriding\nis enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing\nis enabled. If changes_scheduled_at\nis in the past and a unit_price_in_decimal\nis 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" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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)\n--addon-items as well.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 2000, "example" : null }, "example" : null }, "ramp_tier_id" : { "type" : "array", "description" : "

The index or identifier of the ramp to which the item price belongs. Use this index to map item_tier values to the correct ramp, as the target item_price of an item_tier may be part of multiple ramps.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the quote to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "operation_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The operation to be carried out for the discount.

\n\n* add -

The discount is attached to the subscription.

\n* remove -

The discount (given by discounts[id]\n) is removed from the subscription. Subsequent invoices will no longer have the discount applied. Tip:\nIf you want to replace a discount, remove\nit and add\nanother in the same API call.

", "enum" : [ "add", "remove" ], "example" : null }, "example" : null }, "id" : { "type" : "array", "description" : "

The id\nof the discount to be removed. This parameter is only relevant when discounts[operation_type]\nis remove.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "duration_type", "operation_type" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price for which the tier price is being overridden.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/quotes)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ramp_tier_id" : { "type" : "array", "description" : "

The index or identifier of the ramp to which this tier information belongs. This must be a value from the subscription_items[ramp_tier_id][i]. Since an item price can be part of multiple subscriptions ramps, this group ID specifies the ramp to which this tier information belongs.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null }, "example" : null } }, "example" : null }, "coupons" : { "type" : "object", "deprecated" : false, "description" : "", "properties" : { "id" : { "type" : "array", "description" : "The [ID](/docs/api/coupons/coupon-object#id) of the coupon to be applied. [Coupon codes](/docs/api/coupon_codes) are not supported. \n**Note**\n\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Specifies the start date for the coupon. The period of the coupon, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

Specifies the end date for the coupon. The period of the coupon, as specified by the start_date and end_date determines the ramp(s) it will be part of.

\n

Note

The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "entitlement_overrides" : { "type" : "object", "deprecated" : false, "description" : "The set of entitlement overrides to apply on this quote. Each entry targets a feature for an entity on the quote. Overrides are always upserted.\n", "properties" : { "feature_id" : { "type" : "array", "description" : "

The id of the feature for which the entitlement override is being set.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "

The id of the entity on the quote (for example, a plan_price, addon_price, or charge_price handle from the quote context) whose entitlement is being overridden.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of the entity on the quote for which the entitlement override is being set.

\n* plan_price -

Indicates that the entity is an item_price with item_type set to plan.

\n* charge_price -

Indicates that the entity is an item_price with item_type set to charge.

\n* addon_price -

Indicates that the entity is an item_price with item_type set to addon.

", "enum" : [ "plan_price", "addon_price", "charge_price" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "is_enabled" : { "type" : "array", "description" : "

Specifies whether the entitlement for the feature is enabled (true) or disabled (false) for the entity on the quote.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "start_date" : { "type" : "array", "description" : "

Start date (UTC timestamp) of the entitlement override for the item on the quote. Used with end_date for ramp-scoped entitlements.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "end_date" : { "type" : "array", "description" : "

End date (UTC timestamp) of the entitlement override for the item on the quote. Used with start_date for ramp-scoped entitlements.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "coupons" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "entitlement_overrides" : { "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" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "

Resource object representing quoted_subscription

" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "

Resource object representing quoted_ramp

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_quote_line_groups", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "quote_line_group" : { "$ref" : "#/components/schemas/QuoteLineGroup", "description" : "Resource object representing quote_line_group" } }, "required" : [ "quote_line_group" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this quote.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the quote.\n", "maxLength" : 3, "example" : null }, "coupon" : { "type" : "string", "deprecated" : false, "description" : "The 'One Time' coupon to be applied.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days within which the customer has to make payment for the invoice. \n**Note**\n\nThe parameter applies only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team).\n", "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "item_prices" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_prices\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "A unique ID for your system to identify the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Item price quantity\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price or per-unit-price of the item price. By default, it is the value set\nfor the item_price.\nThis is only applicable when the pricing_model\nof the item_price\nis flat_fee\nor per_unit.\nThe value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "Defines service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price to which this tier belongs.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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/getting-started).\nApplicable only when multi-decimal pricing is enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this charge\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* retail -\n\nTransaction is a sale to an end user\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "service_period" : { "type" : "array", "description" : "Service period for charge\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the quote to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "apply_on" ], "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "The unique identifier belonging to a tax vendor when they are onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "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 }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "

Resource object representing quoted_charge

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_quote_as_pdf", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "consolidated_view" : { "type" : "boolean", "default" : false, "deprecated" : false, "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.\n", "example" : null }, "disposition_type" : { "type" : "string", "default" : "attachment", "deprecated" : false, "description" : "Determines the pdf should be rendered as inline or attachment in the browser.\n\\* attachment -\n\nPDF is rendered as attachment in the browser\n\\* inline -\n\nPDF is rendered as inline in the browser\n", "enum" : [ "attachment", "inline" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "download" : { "$ref" : "#/components/schemas/Download", "description" : "

Resource object representing download

" } }, "required" : [ "download" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The quote name will be used as the pdf name of the quote.\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for which the quote needs to be created.\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this quote.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the quote.\n", "maxLength" : 3, "example" : null }, "coupon" : { "type" : "string", "deprecated" : false, "description" : "The 'One Time' coupon to be applied.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

\n

Prerequisite\nYou can use this parameter only when Chargebee CPQ is enabled. Contact Chargebee Support to request access.

", "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "item_prices" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_prices\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "A unique ID for your system to identify the item price.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Item price quantity\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price or per-unit-price of the item price. By default, it is the value set\nfor the item_price.\nThis is only applicable when the pricing_model\nof the item_price\nis flat_fee\nor per_unit.\nThe value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "Defines service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The id of the item price to which this tier belongs.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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/getting-started).\nApplicable only when multi-decimal pricing is enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this charge\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* retail -\n\nTransaction is a sale to an end user\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "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)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "service_period" : { "type" : "array", "description" : "Service period for charge\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the quote to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "apply_on" ], "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "The unique identifier belonging to a tax vendor when they are onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "billing_address" : { "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 }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "

Resource object representing quote

" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "

Resource object representing quoted_charge

" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_entitlements" : { "get" : { "summary" : "List Quote Entitlements", "description" : "

Retrieves the list of quote_entitlements for the quote.

", "operationId" : "list_quote_entitlements", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "entity_id", "in" : "query", "description" : "

Filter quote entitlements by entity_id.\nSupported operators :\nis

\n

Example →\nentity_id[is] = "price-usd"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "start_date", "in" : "query", "description" : "

Filter entitlements by ramp start date (unix timestamp). Use with end_date[on].\nSupported operators :\non

\n

Example →\nstart_date[on] = "1780252200"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1780252200", "properties" : { "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null } } } }, { "name" : "end_date", "in" : "query", "description" : "

Filter entitlements by ramp end date (unix timestamp). Use with start_date[on].\nSupported operators :\non

\n

Example →\nend_date[on] = "1782844200"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1782844200", "properties" : { "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "quote_entitlement" : { "$ref" : "#/components/schemas/QuoteEntitlement", "description" : "Resource object representing quote_entitlement" } }, "required" : [ "quote_entitlement" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_coupons", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "

optional, string filter

\n

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

\n

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.

\n

.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nid[is] = "OFF2008"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF2008", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "

optional, string filter

\n

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

\n

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.

\n

.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nname[is_not] = "Offer 10"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Offer 10", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "discount_type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe type of deduction. Possible values are : fixed_amount, percentage.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*discount_type\\[is\\] = \"fixed_amount\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "fixed_amount", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`fixed_amount\\` - The specified amount will be deducted. \\* \\`percentage\\` - The specified percentage will be deducted. \\* \\`offer_quantity\\` - The specified units will be offered without any deduction.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`fixed_amount\\` - The specified amount will be deducted. \\* \\`percentage\\` - The specified percentage will be deducted. \\* \\`offer_quantity\\` - The specified units will be offered without any deduction.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`fixed_amount\\` - The specified amount will be deducted. \\* \\`percentage\\` - The specified percentage will be deducted. \\* \\`offer_quantity\\` - The specified units will be offered without any deduction.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "pattern" : "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`fixed_amount\\` - The specified amount will be deducted. \\* \\`percentage\\` - The specified percentage will be deducted. \\* \\`offer_quantity\\` - The specified units will be offered without any deduction.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "pattern" : "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\]$", "example" : null } } } }, { "name" : "duration_type", "in" : "query", "description" : "optional, enumerated string filter\n\nSpecifies the time duration for which this coupon is attached to the subscription. Possible values are : one_time, forever, limited_period.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*duration_type\\[is\\] = \"forever\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "forever", "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.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `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" ], "example" : null }, "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.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `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" ], "example" : null }, "in" : { "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.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `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" ], "pattern" : "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\]$", "example" : null }, "not_in" : { "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.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `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" ], "pattern" : "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nStatus of the coupon. Possible values are : active, expired, archived, deleted.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is_not\\] = \"active\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n* `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n* `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n* `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "pattern" : "^\\[(active|expired|archived|deleted|future)(,(active|expired|archived|deleted|future))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n* `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "pattern" : "^\\[(active|expired|archived|deleted|future)(,(active|expired|archived|deleted|future))*\\]$", "example" : null } } } }, { "name" : "apply_on", "in" : "query", "description" : "optional, enumerated string filter\n\nThe amount on the invoice to which the coupon is applied. Possible values are : invoice_amount, each_specified_item.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*apply_on\\[is\\] = \"invoice_amount\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "invoice_amount", "properties" : { "is" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice sub_total.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -
\n The coupon is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.\n
\n
\n The coupon is applied to the invoice.line_item.amount that corresponds to the plan or addon specified by plan_ids and addon_ids.\n
\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice sub_total.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -
\n The coupon is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.\n
\n
\n The coupon is applied to the invoice.line_item.amount that corresponds to the plan or addon specified by plan_ids and addon_ids.\n
\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "in" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice sub_total.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -
\n The coupon is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.\n
\n
\n The coupon is applied to the invoice.line_item.amount that corresponds to the plan or addon specified by plan_ids and addon_ids.\n
\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.", "enum" : [ "invoice_amount", "each_specified_item" ], "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))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice sub_total.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -
\n The coupon is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.\n
\n
\n The coupon is applied to the invoice.line_item.amount that corresponds to the plan or addon specified by plan_ids and addon_ids.\n
\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.", "enum" : [ "invoice_amount", "each_specified_item" ], "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))*\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this coupon is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[before\\] = \"145222875\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "145222875", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at. This attribute will be present only if the resource has been updated after 2016-11-09.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null } }, "example" : null } }, { "name" : "currency_code", "in" : "query", "description" : "optional, string filter\n\nThe currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) of the coupon. Applicable for *fixed_amount*\ncoupons alone.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*currency_code\\[is\\] = \"USD\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "applicable_item_price_ids", "in" : "query", "description" : "optional, string filter\n\nList of itemPrice ids for which these coupons are applicable.\n\n**Supported operators :**\nin, is\n\n**Example →**\n*applicable_item_price_ids\\[is\\] = \"day-pass-USD\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "day-pass-USD", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "Resource object representing coupon" } }, "required" : [ "coupon" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

\n

.

", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "Display name used in invoice. If it is not configured then name is used in invoice.\n", "maxLength" : 100, "example" : null }, "discount_type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "

Specifies the type of discount to be applied.

\n* percentage -

A percentage of the original price is deducted as a discount. The discount percentage is specified in discount_percentage.

\n

Learn more\nabout percentage\ncoupons.

\n* fixed_amount -

A fixed amount is deducted as a discount. The discount amount is specified in discount_amount.

\n

Learn more\nabout fixed_amount\ncoupons.

\n* offer_quantity -

A specified number of units of the item price are offered for free. The number of free units is specified in discount_quantity.\nThe offer_quantity\noption is valid only when apply_on\nis set to each_specified_item\nand the pricing_model\nof the item price is per_unit.

\n

Learn more\nabout offer_quantity\ncoupons.

", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the deduction. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code ([ISO 4217 format](https://www.chargebee.com/docs/2.0/supported-currencies.html)\n) of the coupon. Applicable for *fixed_amount*\ncoupons alone.\n", "maxLength" : 3, "example" : null }, "discount_percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "The percentage of the original amount that should be deducted from it.\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "discount_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the number of free units provided for the item price\n, without affecting the total quantity sold. This parameter is applicable only when the discount_type\nis set to offer_quantity\n.

", "minimum" : 1, "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the coupon is applied.

\n* invoice_amount -

The coupon is applied to the invoice sub_total\n.

\n* each_specified_item -

Applies the coupon to specified items (plans, addons, or charges), with the discount applied to each matching invoice.line_item.amount.

\n

Requires applicability to be configured using item_constraints—for example all, criteria, or specific with item_price_ids.

\n

When you attach this coupon to a subscription, at least one of that subscription's plans, addons, or charges must match those rules. If none do, the request fails.

", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this coupon is attached to the subscription.

\n* forever -

The coupon is attached to the subscription and applied on the invoices until explicitly removed.

\n* one_time -

The coupon stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

\n* 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\nand period_unit\n.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "duration_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

(Deprecated)\nThe duration of time in months for which the coupon is attached to the subscription. Applicable only when duration_type\nis limited_period.

\n

Note:\nThis parameter has been deprecated. Use period\nand period_unit\ninstead.

", "maximum" : 240, "minimum" : 1, "example" : null }, "valid_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date from which the coupon can be applied to subscriptions.\n", "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date upto which the coupon can be applied to new subscriptions.\n", "example" : null }, "max_redemptions" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Maximum number of times this coupon can be redeemed. \n**Note:**\n\nIf not specified, the coupon can be redeemed an indefinite number of times.\n\n.\n", "minimum" : 1, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The coupon is included in MRR calculations for your site. This attribute is only applicable for coupons of duration_type = one_time\nand 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\n.

", "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the coupon is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period\n.

", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period. Applicable only when duration_type\nis limited_period\n.

\n* month -

A period of 1 calendar month.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "item_constraints" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_constraints\n", "properties" : { "constraint" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Constraint applicable for the item\n\\* specific -\n\nCoupon applicable to specific items.\n\\* all -\n\nCoupon applicable to all items.\n\\* criteria -\n\nCoupon applicable based on criteria.\n\\* none -\n\nCoupon not applicable to any items.\n", "enum" : [ "none", "all", "specific", "criteria" ], "example" : null }, "example" : null }, "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Item type for which this criteria is applicable for.\n\\* charge -\n\nCharge\n\\* plan -\n\nPlan\n\\* addon -\n\nAddon\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "example" : null }, "item_price_ids" : { "type" : "array", "description" : "

List of item price ids for which this coupon is applicable.

\n

Note:

When specifying a value for item_price_ids, make sure that the value is wrapped in square brackets ([]), for example: [cbdemo_advanced-USD-Daily] instead of cbdemo_advanced-USD-Daily; otherwise, a param_wrong_value error returns.

For information about item_price_ids, refer to Defining Price Points in Plans, Addons, and Charges.

", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null } }, "required" : [ "constraint", "item_type" ], "example" : null }, "item_constraint_criteria" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_constraint_criteria\n", "properties" : { "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Item type for which this criteria is applicable for.\n\\* charge -\n\nCharge is a type of item\n\\* plan -\n\nPlan is a type of item\n\\* addon -\n\nAddon is a type of item\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "example" : null }, "item_family_ids" : { "type" : "array", "description" : "List of families for which this coupon is applicable.\n", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null }, "currencies" : { "type" : "array", "description" : "List of currencies ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) for which this coupon is applicable.\n", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null }, "item_price_periods" : { "type" : "array", "description" : "

Pass the item price period units for this criterion. period\nfollowed by period_units.\nSuch as [1 day,1 week,3 month,6 month]

", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null } }, "example" : null }, "coupon_constraints" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for coupon_constraints.\nMultiple coupon_constraints\ncan be passed by specifying unique indices.

", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The resource type for the constraint. This, along with type\nand value\n, helps define the specific rule applied.

\n* customer -

The constraint is based on customer\nrecords.

", "enum" : [ "customer" ], "example" : null }, "example" : null }, "type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of coupon constraint.

\n* unique_by -

Indicates - when entity_type\nis customer

\n\n* new_customer -

The coupon is applicable only for new customer(s). A customer will be considered as new_customer\nwhen they do not have any prior non-void, non-zero-dollar invoices.

\n* existing_customer -

The coupon is applicable only for existing customer(s). A customer will be considered as existing_customer\nwhen they have at least one non-void, non-zero-dollar invoice.

\n* 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\n, and the resource type is specified using entity_type.\nFor example, if entity_type\nis customer\nand value\nis 10\nthen the coupon can only be redeemed up to 10 times for any particular customer\nrecord.

", "enum" : [ "max_redemptions", "unique_by", "existing_customer", "new_customer" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value of the coupon constraint. The possible values depend on the value of constraints[type]:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "example" : null } }, "required" : [ "entity_type", "type" ], "example" : null } }, "example" : null }, "encoding" : { "coupon_constraints" : { "style" : "deepObject", "explode" : true }, "item_constraint_criteria" : { "style" : "deepObject", "explode" : true }, "item_constraints" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "

Resource object representing coupon

" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "unarchive_a_coupon", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "

Resource object representing coupon

" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nTo 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](/docs/api/coupons/unarchive-a-coupon). Unused Coupons codes are deleted.\n", "operationId" : "delete_a_coupon", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "

Resource object representing coupon

" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 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, in the destination site. Hence, it is recommended that the item prices be copied over before copying the coupons.

The value for 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, it's 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "from_site" : { "type" : "string", "deprecated" : false, "description" : "Your Chargebee site name having the coupon to be copied.\n**Note:**\nUnless you are copying from a twin site (acme \\& acme-test are twin sites), [contact support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\nto have this allow-listed.\n", "maxLength" : 50, "example" : null }, "id_at_from_site" : { "type" : "string", "deprecated" : false, "description" : "Id of the coupon to be copied. The new coupon created in this site will have the same Id.\n", "maxLength" : 100, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Id of copied coupon in this site.\n", "maxLength" : 100, "example" : null }, "for_site_merging" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If copy action is performed as part of Chargebee site merge action, pass the value as true.\n**Note:**\nIf this parameter is passed true coupon state, redemptions, coupon set and coupon codes associated with this coupon will be copied.\n", "example" : null } }, "required" : [ "from_site", "id_at_from_site" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "

Resource object representing coupon

" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_coupon", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "

Resource object representing coupon

" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

\n

.

", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

\n

.

", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "Display name used in invoice. If it is not configured then name is used in invoice.\n", "maxLength" : 100, "example" : null }, "discount_type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "

Specifies the type of discount to be applied.

\n* percentage -

A percentage of the original price is deducted as a discount. The discount percentage is specified in discount_percentage.

\n

Learn more\nabout percentage\ncoupons.

\n* fixed_amount -

A fixed amount is deducted as a discount. The discount amount is specified in discount_amount.

\n

Learn more\nabout fixed_amount\ncoupons.

\n* offer_quantity -

A specified number of units of the item price are offered for free. The number of free units is specified in discount_quantity.\nThe offer_quantity\noption is valid only when apply_on\nis set to each_specified_item\nand the pricing_model\nof the item price is per_unit.

\n

Learn more\nabout offer_quantity\ncoupons.

", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the deduction. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code ([ISO 4217 format](https://www.chargebee.com/docs/2.0/supported-currencies.html)\n) of the coupon. Applicable for *fixed_amount*\ncoupons alone.\n", "maxLength" : 3, "example" : null }, "discount_percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "The percentage of the original amount that should be deducted from it.\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "discount_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the number of free units provided for the item price\n, without affecting the total quantity sold. This parameter is applicable only when the discount_type\nis set to offer_quantity\n.

", "minimum" : 1, "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the coupon is applied.

\n* invoice_amount -

The coupon is applied to the invoice sub_total\n.

\n* each_specified_item -

Applies the coupon to specified items (plans, addons, or charges), with the discount applied to each matching invoice.line_item.amount.

\n

Requires applicability to be configured using item_constraints—for example all, criteria, or specific with item_price_ids.

\n

When you attach this coupon to a subscription, at least one of that subscription's plans, addons, or charges must match those rules. If none do, the request fails.

", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this coupon is attached to the subscription.

\n* forever -

The coupon is attached to the subscription and applied on the invoices until explicitly removed.

\n* one_time -

The coupon stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

\n* 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\nand period_unit\n.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "duration_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

(Deprecated)\nThe duration of time in months for which the coupon is attached to the subscription. Applicable only when duration_type\nis limited_period.

\n

Note:\nThis parameter has been deprecated. Use period\nand period_unit\ninstead.

", "maximum" : 240, "minimum" : 1, "example" : null }, "valid_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date from which the coupon can be applied to subscriptions.\n", "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date upto which the coupon can be applied to new subscriptions.\n", "example" : null }, "max_redemptions" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Maximum number of times this coupon can be redeemed. \n**Note:**\n\nIf not specified, the coupon can be redeemed an indefinite number of times.\n\n.\n", "minimum" : 1, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The coupon is included in MRR calculations for your site. This attribute is only applicable for coupons of duration_type = one_time\nand 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\n.

", "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the coupon is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period\n.

", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period. Applicable only when duration_type\nis limited_period\n.

\n* month -

A period of 1 calendar month.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "status" : { "type" : "string", "default" : "active", "deprecated" : false, "description" : "Status of the coupon.\n\\* archived -\n\nCannot be applied to a subscription. Existing associations remain unaffected.\n\\* active -\n\nCan be applied to a subscription.\n", "enum" : [ "active", "archived" ], "example" : null }, "item_constraints" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_constraints\n", "properties" : { "constraint" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Constraint applicable for the item\n\\* specific -\n\nCoupon applicable to specific items.\n\\* all -\n\nCoupon applicable to all items.\n\\* criteria -\n\nCoupon applicable based on criteria.\n\\* none -\n\nCoupon not applicable to any items.\n", "enum" : [ "none", "all", "specific", "criteria" ], "example" : null }, "example" : null }, "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Item type for which this criteria is applicable for.\n\\* charge -\n\nCharge\n\\* plan -\n\nPlan\n\\* addon -\n\nAddon\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "example" : null }, "item_price_ids" : { "type" : "array", "description" : "

List of item price ids for which this coupon is applicable.

\n

Note:

When specifying a value for item_price_ids, make sure that the value is wrapped in square brackets ([]), for example: [cbdemo_advanced-USD-Daily] instead of cbdemo_advanced-USD-Daily; otherwise, a param_wrong_value error returns.

For information about item_price_ids, refer to Defining Price Points in Plans, Addons, and Charges.

", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null } }, "required" : [ "constraint", "item_type" ], "example" : null }, "item_constraint_criteria" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_constraint_criteria\n", "properties" : { "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Item type for which this criteria is applicable for.\n\\* charge -\n\nCharge is a type of item\n\\* plan -\n\nPlan is a type of item\n\\* addon -\n\nAddon is a type of item\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "example" : null }, "item_family_ids" : { "type" : "array", "description" : "List of families for which this coupon is applicable.\n", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null }, "currencies" : { "type" : "array", "description" : "List of currencies ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) for which this coupon is applicable.\n", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null }, "item_price_periods" : { "type" : "array", "description" : "

Pass the item price period units for this criterion. period\nfollowed by period_units.\nSuch as [1 day,1 week,3 month,6 month]

", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null } }, "example" : null }, "coupon_constraints" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for coupon_constraints.\nMultiple coupon_constraints\ncan be passed by specifying unique indices.

", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The resource type for the constraint. This, along with type\nand value\n, helps define the specific rule applied.

\n* customer -

The constraint is based on customer\nrecords.

", "enum" : [ "customer" ], "example" : null }, "example" : null }, "type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of coupon constraint.

\n* unique_by -

Indicates - when entity_type\nis customer

\n\n* new_customer -

The coupon is applicable only for new customer(s). A customer will be considered as new_customer\nwhen they do not have any prior non-void, non-zero-dollar invoices.

\n* existing_customer -

The coupon is applicable only for existing customer(s). A customer will be considered as existing_customer\nwhen they have at least one non-void, non-zero-dollar invoice.

\n* 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\n, and the resource type is specified using entity_type.\nFor example, if entity_type\nis customer\nand value\nis 10\nthen the coupon can only be redeemed up to 10 times for any particular customer\nrecord.

", "enum" : [ "max_redemptions", "unique_by", "existing_customer", "new_customer" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value of the coupon constraint. The possible values depend on the value of constraints[type]:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "example" : null } }, "required" : [ "entity_type", "type" ], "example" : null } }, "required" : [ "apply_on", "id", "name" ], "example" : null }, "encoding" : { "coupon_constraints" : { "style" : "deepObject", "explode" : true }, "item_constraint_criteria" : { "style" : "deepObject", "explode" : true }, "item_constraints" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "

Resource object representing coupon

" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_coupon_sets", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUniquely identifies a coupon_set.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"bulk-codes-1\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "bulk-codes-1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "optional, string filter\n\nName of the coupon set.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*name\\[is_not\\] = \"bulk-codes-1\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "bulk-codes-1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "coupon_id", "in" : "query", "description" : "optional, string filter\n\nCoupon id linked to coupon set.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*coupon_id\\[is\\] = \"OFF2008\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF2008", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "total_count", "in" : "query", "description" : "optional, integer filter\n\nNo of coupon codes present in coupon set.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*total_count\\[gt\\] = \"10\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "10", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "redeemed_count", "in" : "query", "description" : "optional, integer filter\n\nNo of redeemed codes.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*redeemed_count\\[is\\] = \"5\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "archived_count", "in" : "query", "description" : "optional, integer filter\n\nNo of archived codes.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*archived_count\\[is\\] = \"2\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "2", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "Resource object representing coupon_set" } }, "required" : [ "coupon_set" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "operationId" : "create_a_coupon_set", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "Coupon id linked to coupon set.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "Name of the coupon set.\n", "maxLength" : 50, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a coupon_set.\n", "maxLength" : 50, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null } }, "required" : [ "coupon_id", "id", "name" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "

Resource object representing coupon_set

" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "Name of the coupon set.\n", "maxLength" : 50, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "

Resource object representing coupon_set

" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_coupon_set", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "

Resource object representing coupon_set

" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "code" : { "type" : "array", "deprecated" : false, "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.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "

Resource object representing coupon_set

" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "delete_unused_coupon_codes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "

Resource object representing coupon_set

" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n", "operationId" : "delete_a_coupon_set", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "

Resource object representing coupon_set

" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_coupon_codes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "code", "in" : "query", "description" : "optional, string filter\n\nUnique coupon code that can be redeemed only once.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*code\\[is_not\\] = \"OFF2009\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF2009", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "coupon_id", "in" : "query", "description" : "optional, string filter\n\nId of the main coupon resource.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*coupon_id\\[is\\] = \"OFF20\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF20", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "coupon_set_name", "in" : "query", "description" : "optional, string filter\n\nCoupon 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.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*coupon_set_name\\[is_not\\] = \"OFF20\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF20", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nStatus of the coupon code. Possible values are : not_redeemed, redeemed, archived.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"redeemed\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "redeemed", "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.\n", "enum" : [ "not_redeemed", "redeemed", "archived" ], "example" : null }, "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.\n", "enum" : [ "not_redeemed", "redeemed", "archived" ], "example" : null }, "in" : { "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.\n", "enum" : [ "not_redeemed", "redeemed", "archived" ], "pattern" : "^\\[(not_redeemed|redeemed|archived)(,(not_redeemed|redeemed|archived))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "not_redeemed", "redeemed", "archived" ], "pattern" : "^\\[(not_redeemed|redeemed|archived)(,(not_redeemed|redeemed|archived))*\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "coupon_code" : { "$ref" : "#/components/schemas/CouponCode", "description" : "Resource object representing coupon_code" } }, "required" : [ "coupon_code" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_coupon_code", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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|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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-code-code", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-code-code", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_code" : { "$ref" : "#/components/schemas/CouponCode", "description" : "

Resource object representing coupon_code

" } }, "required" : [ "coupon_code" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "archive_a_coupon_code", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "coupon-code-code", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-code-code", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_code" : { "$ref" : "#/components/schemas/CouponCode", "description" : "

Resource object representing coupon_code

" } }, "required" : [ "coupon_code" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, { "name" : "label", "in" : "query", "description" : "Label to identify the address. This is unique for all the address for a subscription.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "address" : { "$ref" : "#/components/schemas/Address", "description" : "

Resource object representing address

" } }, "required" : [ "address" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_an_address", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "Label to identify the address. This is unique for all the address for a subscription.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number.\n", "maxLength" : 50, "example" : null }, "addr" : { "type" : "string", "deprecated" : false, "description" : "Address line 1.\n", "maxLength" : 150, "example" : null }, "extended_addr" : { "type" : "string", "deprecated" : false, "description" : "Address line 2.\n", "maxLength" : 150, "example" : null }, "extended_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 3.\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "Name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

\n

.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* invalid -\n\nAddress is invalid.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "required" : [ "label", "subscription_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "address" : { "$ref" : "#/components/schemas/Address", "description" : "

Resource object representing address

" } }, "required" : [ "address" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "**Advanced Usage-Based Billing**\n\nFor high-scale usage ingestion, use [Advanced Usage-Based Billing](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/understanding-usages) with the [Usage Events API](/docs/api/usage_events). The Usage Events API supports schemaless event ingestion at scale, including [individual events](/docs/api/usage_events/create-a-usage-event), [batch ingestion](/docs/api/usage_events/ingest-usages-in-batch), and [usage file ingestion](/docs/api/usage_files/usage-file-object).\n\nRetrieves usages record for an invoice in PDF file format. This endpoint is part of the [Usages API](/docs/api/usages) for **Automated Metered Billing**.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "disposition_type" : { "type" : "string", "default" : "attachment", "deprecated" : false, "description" : "Determines the pdf should be rendered as inline or attachment in the browser.\n\\* attachment -\n\nPDF is rendered as attachment in the browser\n\\* inline -\n\nPDF is rendered as inline in the browser\n", "enum" : [ "attachment", "inline" ], "example" : null }, "invoice" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The invoice number. Acts as a identifier for invoice and typically generated sequentially.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "invoice" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "download" : { "$ref" : "#/components/schemas/Download", "description" : "

Resource object representing download

" } }, "required" : [ "download" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "**Advanced Usage-Based Billing**\n\nFor high-scale usage ingestion, use [Advanced Usage-Based Billing](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/understanding-usages) with the [Usage Events API](/docs/api/usage_events). The Usage Events API supports schemaless event ingestion at scale, including [individual events](/docs/api/usage_events/create-a-usage-event), [batch ingestion](/docs/api/usage_events/ingest-usages-in-batch), and [usage file ingestion](/docs/api/usage_files/usage-file-object).\n\nRetrieves a usage record of a specific subscription. This endpoint is part of the [Usages API](/docs/api/usages) for **Automated Metered Billing**.\n", "operationId" : "retrieve_a_usage", "parameters" : [ { "name" : "id", "in" : "query", "description" : "The unique identifier for the usage record to be retrieved.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "usage" : { "$ref" : "#/components/schemas/Usage", "description" : "

Resource object representing usage

" } }, "required" : [ "usage" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "

Advanced Usage-Based Billing

For high-scale usage ingestion, use Advanced Usage-Based Billing with the Usage Events API. The Usage Events API supports schemaless event ingestion at scale, including individual events, batch ingestion, and usage file ingestion.

Creates a usage record for an item price in a subscription. The item price must belong to a metered item. This endpoint is part of the Usages API for Automated Metered Billing.

Max Usages

Legacy metered billing applies per-subscription usage limits over the subscription lifetime. Contact Support for the limit applicable to your site or to request an increase. For high-volume usage at scale, see Usage-Based Billing.

", "operationId" : "create_a_usage", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable id for the usage. If not provided, it is autogenerated.\n", "maxLength" : 100, "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the [item price](/docs/api/item_prices)\nto which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.\n", "maxLength" : 100, "example" : null }, "quantity" : { "type" : "string", "deprecated" : false, "description" : "The quantity specified for this usage record.\n", "maxLength" : 40, "example" : null }, "usage_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which this usage occurred. Chargebee bills only those usages whose\nusage_date\nfalls within a time when the subscription status\nwas active\nor non_renewing.\nHowever, the remaining usage records are still stored and are\nretrievable.

\n

Note:\nIf usage_date\ncorresponds to a time already invoiced, then it is stored but never invoiced unless the invoice is regenerated\n.

", "example" : null }, "note" : { "type" : "string", "deprecated" : false, "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/retrieve-invoice-as-pdf)\nor [Hosted Pages](/docs/api/hosted_pages)\n.\n", "maxLength" : 500, "example" : null } }, "required" : [ "item_price_id", "quantity", "usage_date" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "usage" : { "$ref" : "#/components/schemas/Usage", "description" : "

Resource object representing usage

" } }, "required" : [ "usage" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "**Advanced Usage-Based Billing**\n\nFor high-scale usage ingestion, use [Advanced Usage-Based Billing](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/understanding-usages) with the [Usage Events API](/docs/api/usage_events). The Usage Events API supports schemaless event ingestion at scale, including [individual events](/docs/api/usage_events/create-a-usage-event), [batch ingestion](/docs/api/usage_events/ingest-usages-in-batch), and [usage file ingestion](/docs/api/usage_files/usage-file-object).\n\nDeletes a usage record. This operation cannot be invoked for a usage record that has been [invoiced](/docs/api/usages). This endpoint is part of the [Usages API](/docs/api/usages) for **Automated Metered Billing**.\n", "operationId" : "delete_a_usage", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable id for the usage. If not provided, it is autogenerated.\n", "maxLength" : 100, "example" : null } }, "required" : [ "id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "usage" : { "$ref" : "#/components/schemas/Usage", "description" : "

Resource object representing usage

" } }, "required" : [ "usage" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "**Advanced Usage-Based Billing**\n\nFor high-scale usage ingestion, use [Advanced Usage-Based Billing](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/understanding-usages) with the [Usage Events API](/docs/api/usage_events). The Usage Events API supports schemaless event ingestion at scale, including [individual events](/docs/api/usage_events/create-a-usage-event), [batch ingestion](/docs/api/usage_events/ingest-usages-in-batch), and [usage file ingestion](/docs/api/usage_files/usage-file-object).\n\nRetrieves the list of usages. This endpoint is part of the [Usages API](/docs/api/usages) for **Automated Metered Billing**.\n", "operationId" : "list_usages", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nA unique and immutable id for the usage. If not provided, it is autogenerated.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*id\\[is\\] = \"usage_lsfja24411\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "usage_lsfja24411", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nThe id of the [subscription](/docs/api/subscriptions)\nto which this usage record belongs.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*subscription_id\\[is\\] = \"active2\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active2", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "usage_date", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

The time at which this usage occurred. Chargebee bills only those usages whose\nusage_date\nfalls within a time when the subscription status\nwas active\nor non_renewing.\nHowever, the remaining usage records are still stored and are\nretrievable.

\n

Note:\nIf usage_date\ncorresponds to a time already invoiced, then it is stored but never invoiced unless the invoice is regenerated\n.\nSupported operators :\nafter, before, on, between

\n

Example →\nusage_date[after] = "1601220958"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1601220958", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "Timestamp indicating when this usage resource was last updated.\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1601220958", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "item_price_id", "in" : "query", "description" : "optional, string filter\n\nThe id of the [item price](/docs/api/item_prices)\nto which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*item_price_id\\[is\\] = \"sprout\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "sprout", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "invoice_id", "in" : "query", "description" : "

optional, string filter

\n

When the usage has been invoiced, this is the id\nof the invoice.\nThis is cleared when the invoice is voided\nor deleted.\nSupported operators :\nis, is_not, starts_with, is_present

\n

Example →\ninvoice_id[is] = "null"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } }, { "name" : "source", "in" : "query", "description" : "optional, enumerated string filter\n\nThe source from which the usage record was created. Possible values are : admin_console, api, bulk_operation.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*source\\[is\\] = \"api\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "api", "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.\n", "enum" : [ "admin_console", "api", "bulk_operation" ], "example" : null }, "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.\n", "enum" : [ "admin_console", "api", "bulk_operation" ], "example" : null }, "in" : { "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.\n", "enum" : [ "admin_console", "api", "bulk_operation" ], "pattern" : "^\\[(admin_console|api|bulk_operation)(,(admin_console|api|bulk_operation))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "admin_console", "api", "bulk_operation" ], "pattern" : "^\\[(admin_console|api|bulk_operation)(,(admin_console|api|bulk_operation))*\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\nusage_date\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"usage_date\"*\n\nThis will sort the result based on the 'usage_date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "usage_date", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "usage_date", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "usage" : { "$ref" : "#/components/schemas/Usage", "description" : "Resource object representing usage" } }, "required" : [ "usage" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_events", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUniquely identifies a event.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"8ndk0hbKm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8ndk0hbKm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "webhook_status", "in" : "query", "description" : "optional, enumerated string filter\n\nReturns the events (occurred in the past 6 days) which has this status in any of the events' webhooks.\n**Note**:\nTo 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.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*webhook_status\\[is\\] = \"succeeded\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "succeeded", "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. \\* \\`disabled\\` - Disabled as no longer used \\* \\`rate_limited\\` - Webhook call was rate limited.\n", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "example" : null }, "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. \\* \\`disabled\\` - Disabled as no longer used \\* \\`rate_limited\\` - Webhook call was rate limited.\n", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "example" : null }, "in" : { "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. \\* \\`disabled\\` - Disabled as no longer used \\* \\`rate_limited\\` - Webhook call was rate limited.\n", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "pattern" : "^\\[(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable|disabled|rate_limited)(,(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable|disabled|rate_limited))*\\]$", "example" : null }, "not_in" : { "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. \\* \\`disabled\\` - Disabled as no longer used \\* \\`rate_limited\\` - Webhook call was rate limited.\n", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "pattern" : "^\\[(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable|disabled|rate_limited)(,(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable|disabled|rate_limited))*\\]$", "example" : null } } } }, { "name" : "event_type", "in" : "query", "description" : "optional, enumerated string filter\n\nSpecify 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.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*event_type\\[is\\] = \"customer_created\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "customer_created", "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_items_renewed\\` - Sent when one or more Subscription Items are renewed \\* \\`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 \\* \\`payment_schedules_created\\` - Event triggered when new payment schedules are created for an invoice \\* \\`payment_schedules_updated\\` - Event triggered when payment schedules are updated for an invoice \\* \\`payment_schedule_scheme_created\\` - Event triggered when a new payment schedule scheme is created \\* \\`payment_schedule_scheme_deleted\\` - Event triggered when a payment schedule scheme 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 \\* \\`payment_due_reminder\\` - Sent after scheduled days of payment failure \\* \\`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 \\* \\`dunning_updated\\` - Sent when dunning is paused for an invoice \\* \\`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 \\* \\`subscription_entitlements_updated\\` - Triggered when subscription entitlements are updated due to the subscription change event \\* \\`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. \\* \\`payment_source_business_entity_changed\\` - Sent when a payment source'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 \\* \\`subscription_ramp_created\\` - Triggered when a subscription ramp is created. \\* \\`subscription_ramp_deleted\\` - Triggered when a subscription ramp is deleted. \\* \\`subscription_ramp_applied\\` - Triggered when a subscription ramp is applied. \\* \\`subscription_ramp_drafted\\` - Triggered when a subscription ramp is moved to draft status. \\* \\`subscription_ramp_updated\\` - Triggered when a subscription ramp is updated. \\* \\`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. \\* \\`customer_entitlements_updated\\` - Triggered when entitlements for the list of customers got updated. \\* \\`subscription_moved_in\\` - Triggered when a subscription moved from other customer \\* \\`subscription_moved_out\\` - Triggered when a subscription moved to other customer \\* \\`subscription_movement_failed\\` - Triggered when a subscription movement failed \\* \\`omnichannel_subscription_created\\` - Triggered when an omnichannel subscription is created \\* \\`omnichannel_subscription_item_renewed\\` - Triggered when an omnichannel subscription item is renewed \\* \\`omnichannel_subscription_item_downgrade_scheduled\\` - \\*\\*(Deprecated)\\*\\* Triggered when an omnichannel subscription item is downgrade is scheduled \\* \\`omnichannel_subscription_item_scheduled_downgrade_removed\\` - \\*\\*(Deprecated)\\*\\* Triggered when an omnichannel subscription item scheduled downgrade is removed \\* \\`omnichannel_subscription_item_downgraded\\` - Triggered when an omnichannel subscription item is downgraded \\* \\`omnichannel_subscription_item_expired\\` - Triggered when an omnichannel subscription item is expired \\* \\`omnichannel_subscription_item_cancellation_scheduled\\` - Triggered when an omnichannel subscription item is scheduled for cancellation \\* \\`omnichannel_subscription_item_scheduled_cancellation_removed\\` - Triggered when an omnichannel subscription item scheduled cancellation is removed \\* \\`omnichannel_subscription_item_resubscribed\\` - Triggered when an omnichannel subscription item is resubscribed \\* \\`omnichannel_subscription_item_upgraded\\` - Triggered when an omnichannel subscription item is upgraded \\* \\`omnichannel_subscription_item_cancelled\\` - Triggered when an omnichannel subscription item is cancelled \\* \\`omnichannel_subscription_imported\\` - Triggered when an omnichannel subscription item is imported \\* \\`omnichannel_subscription_item_grace_period_started\\` - Triggered when an omnichannel subscription item's grace period has started \\* \\`omnichannel_subscription_item_grace_period_expired\\` - Triggered when an omnichannel subscription item's grace period has expired \\* \\`omnichannel_subscription_item_dunning_started\\` - Triggered when an omnichannel subscription item's dunning has started \\* \\`omnichannel_subscription_item_dunning_expired\\` - Triggered when an omnichannel subscription item's dunning has expired \\* \\`rule_created\\` - Triggered when a rule is created \\* \\`rule_updated\\` - Triggered when a rule is updated \\* \\`rule_deleted\\` - Triggered when a rule is deleted \\* \\`record_purchase_failed\\` - Triggered when an omnichannel record purchase is failed \\* \\`omnichannel_subscription_item_change_scheduled\\` - Triggered when an omnichannel subscription item change is scheduled \\* \\`omnichannel_subscription_item_scheduled_change_removed\\` - Triggered when an omnichannel subscription item scheduled change is removed \\* \\`omnichannel_subscription_item_reactivated\\` - Triggered when an omnichannel subscription item's refund is reversed \\* \\`sales_order_created\\` - Triggered when sales order is created \\* \\`sales_order_updated\\` - Triggered when sales order is updated \\* \\`omnichannel_subscription_item_changed\\` - Triggered when an omnichannel subscription item is changed \\* \\`omnichannel_subscription_item_paused\\` - Triggered when an omnichannel subscription item is paused \\* \\`omnichannel_subscription_item_resumed\\` - Triggered when an omnichannel subscription item is resumed \\* \\`omnichannel_one_time_order_created\\` - Triggered when an omnichannel one time order is created \\* \\`omnichannel_one_time_order_item_cancelled\\` - Triggered when an omnichannel one time order item is cancelled \\* \\`usage_file_ingested\\` - Triggered when a usage file is ingested \\* \\`omnichannel_subscription_item_pause_scheduled\\` - Triggered when an omnichannel subscription item scheduled for pause \\* \\`omnichannel_subscription_moved_in\\` - Triggered when an omnichannel subscription is moved into another customer \\* \\`omnichannel_transaction_created\\` - Triggered when an omnichannel transaction is created \\* \\`alert_status_changed\\` - Triggered when the status for an alert changes \\* \\`omnichannel_subscription_item_updated\\` - Triggered when an omnichannel subscription item is updated \\* \\`omnichannel_subscription_item_recovered\\` - Triggered when an omnichannel subscription item is recovered from grace period or dunning \\* \\`omnichannel_subscription_item_mrr_updated\\` - Triggered when an omnichannel subscription item's MRR is updated \\* \\`ledger_account_balance_updated\\` - Triggered when a ledger account balance changes for a subscription unit. \\* \\`grant_blocks_created\\` - Triggered when one or more grant blocks are created for a subscription unit. \\* \\`grant_blocks_updated\\` - Triggered when one or more grant blocks are updated for a subscription unit. \\* \\`ledger_updated\\` - Triggered when a batch of ledger operations is persisted for a subscription unit. \\* \\`vault_token_created\\` - Triggered when a payment method is tokenized and stored in the vault. \\* \\`vault_token_updated\\` - Triggered when a vaulted payment method is updated. \\* \\`vault_token_deleted\\` - Triggered when a vaulted payment method is deleted from the vault.\n", "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "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_items_renewed\\` - Sent when one or more Subscription Items are renewed \\* \\`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 \\* \\`payment_schedules_created\\` - Event triggered when new payment schedules are created for an invoice \\* \\`payment_schedules_updated\\` - Event triggered when payment schedules are updated for an invoice \\* \\`payment_schedule_scheme_created\\` - Event triggered when a new payment schedule scheme is created \\* \\`payment_schedule_scheme_deleted\\` - Event triggered when a payment schedule scheme 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 \\* \\`payment_due_reminder\\` - Sent after scheduled days of payment failure \\* \\`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 \\* \\`dunning_updated\\` - Sent when dunning is paused for an invoice \\* \\`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 \\* \\`subscription_entitlements_updated\\` - Triggered when subscription entitlements are updated due to the subscription change event \\* \\`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. \\* \\`payment_source_business_entity_changed\\` - Sent when a payment source'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 \\* \\`subscription_ramp_created\\` - Triggered when a subscription ramp is created. \\* \\`subscription_ramp_deleted\\` - Triggered when a subscription ramp is deleted. \\* \\`subscription_ramp_applied\\` - Triggered when a subscription ramp is applied. \\* \\`subscription_ramp_drafted\\` - Triggered when a subscription ramp is moved to draft status. \\* \\`subscription_ramp_updated\\` - Triggered when a subscription ramp is updated. \\* \\`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. \\* \\`customer_entitlements_updated\\` - Triggered when entitlements for the list of customers got updated. \\* \\`subscription_moved_in\\` - Triggered when a subscription moved from other customer \\* \\`subscription_moved_out\\` - Triggered when a subscription moved to other customer \\* \\`subscription_movement_failed\\` - Triggered when a subscription movement failed \\* \\`omnichannel_subscription_created\\` - Triggered when an omnichannel subscription is created \\* \\`omnichannel_subscription_item_renewed\\` - Triggered when an omnichannel subscription item is renewed \\* \\`omnichannel_subscription_item_downgrade_scheduled\\` - \\*\\*(Deprecated)\\*\\* Triggered when an omnichannel subscription item is downgrade is scheduled \\* \\`omnichannel_subscription_item_scheduled_downgrade_removed\\` - \\*\\*(Deprecated)\\*\\* Triggered when an omnichannel subscription item scheduled downgrade is removed \\* \\`omnichannel_subscription_item_downgraded\\` - Triggered when an omnichannel subscription item is downgraded \\* \\`omnichannel_subscription_item_expired\\` - Triggered when an omnichannel subscription item is expired \\* \\`omnichannel_subscription_item_cancellation_scheduled\\` - Triggered when an omnichannel subscription item is scheduled for cancellation \\* \\`omnichannel_subscription_item_scheduled_cancellation_removed\\` - Triggered when an omnichannel subscription item scheduled cancellation is removed \\* \\`omnichannel_subscription_item_resubscribed\\` - Triggered when an omnichannel subscription item is resubscribed \\* \\`omnichannel_subscription_item_upgraded\\` - Triggered when an omnichannel subscription item is upgraded \\* \\`omnichannel_subscription_item_cancelled\\` - Triggered when an omnichannel subscription item is cancelled \\* \\`omnichannel_subscription_imported\\` - Triggered when an omnichannel subscription item is imported \\* \\`omnichannel_subscription_item_grace_period_started\\` - Triggered when an omnichannel subscription item's grace period has started \\* \\`omnichannel_subscription_item_grace_period_expired\\` - Triggered when an omnichannel subscription item's grace period has expired \\* \\`omnichannel_subscription_item_dunning_started\\` - Triggered when an omnichannel subscription item's dunning has started \\* \\`omnichannel_subscription_item_dunning_expired\\` - Triggered when an omnichannel subscription item's dunning has expired \\* \\`rule_created\\` - Triggered when a rule is created \\* \\`rule_updated\\` - Triggered when a rule is updated \\* \\`rule_deleted\\` - Triggered when a rule is deleted \\* \\`record_purchase_failed\\` - Triggered when an omnichannel record purchase is failed \\* \\`omnichannel_subscription_item_change_scheduled\\` - Triggered when an omnichannel subscription item change is scheduled \\* \\`omnichannel_subscription_item_scheduled_change_removed\\` - Triggered when an omnichannel subscription item scheduled change is removed \\* \\`omnichannel_subscription_item_reactivated\\` - Triggered when an omnichannel subscription item's refund is reversed \\* \\`sales_order_created\\` - Triggered when sales order is created \\* \\`sales_order_updated\\` - Triggered when sales order is updated \\* \\`omnichannel_subscription_item_changed\\` - Triggered when an omnichannel subscription item is changed \\* \\`omnichannel_subscription_item_paused\\` - Triggered when an omnichannel subscription item is paused \\* \\`omnichannel_subscription_item_resumed\\` - Triggered when an omnichannel subscription item is resumed \\* \\`omnichannel_one_time_order_created\\` - Triggered when an omnichannel one time order is created \\* \\`omnichannel_one_time_order_item_cancelled\\` - Triggered when an omnichannel one time order item is cancelled \\* \\`usage_file_ingested\\` - Triggered when a usage file is ingested \\* \\`omnichannel_subscription_item_pause_scheduled\\` - Triggered when an omnichannel subscription item scheduled for pause \\* \\`omnichannel_subscription_moved_in\\` - Triggered when an omnichannel subscription is moved into another customer \\* \\`omnichannel_transaction_created\\` - Triggered when an omnichannel transaction is created \\* \\`alert_status_changed\\` - Triggered when the status for an alert changes \\* \\`omnichannel_subscription_item_updated\\` - Triggered when an omnichannel subscription item is updated \\* \\`omnichannel_subscription_item_recovered\\` - Triggered when an omnichannel subscription item is recovered from grace period or dunning \\* \\`omnichannel_subscription_item_mrr_updated\\` - Triggered when an omnichannel subscription item's MRR is updated \\* \\`ledger_account_balance_updated\\` - Triggered when a ledger account balance changes for a subscription unit. \\* \\`grant_blocks_created\\` - Triggered when one or more grant blocks are created for a subscription unit. \\* \\`grant_blocks_updated\\` - Triggered when one or more grant blocks are updated for a subscription unit. \\* \\`ledger_updated\\` - Triggered when a batch of ledger operations is persisted for a subscription unit. \\* \\`vault_token_created\\` - Triggered when a payment method is tokenized and stored in the vault. \\* \\`vault_token_updated\\` - Triggered when a vaulted payment method is updated. \\* \\`vault_token_deleted\\` - Triggered when a vaulted payment method is deleted from the vault.\n", "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "in" : { "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_items_renewed\\` - Sent when one or more Subscription Items are renewed \\* \\`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 \\* \\`payment_schedules_created\\` - Event triggered when new payment schedules are created for an invoice \\* \\`payment_schedules_updated\\` - Event triggered when payment schedules are updated for an invoice \\* \\`payment_schedule_scheme_created\\` - Event triggered when a new payment schedule scheme is created \\* \\`payment_schedule_scheme_deleted\\` - Event triggered when a payment schedule scheme 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 \\* \\`payment_due_reminder\\` - Sent after scheduled days of payment failure \\* \\`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 \\* \\`dunning_updated\\` - Sent when dunning is paused for an invoice \\* \\`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 \\* \\`subscription_entitlements_updated\\` - Triggered when subscription entitlements are updated due to the subscription change event \\* \\`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. \\* \\`payment_source_business_entity_changed\\` - Sent when a payment source'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 \\* \\`subscription_ramp_created\\` - Triggered when a subscription ramp is created. \\* \\`subscription_ramp_deleted\\` - Triggered when a subscription ramp is deleted. \\* \\`subscription_ramp_applied\\` - Triggered when a subscription ramp is applied. \\* \\`subscription_ramp_drafted\\` - Triggered when a subscription ramp is moved to draft status. \\* \\`subscription_ramp_updated\\` - Triggered when a subscription ramp is updated. \\* \\`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. \\* \\`customer_entitlements_updated\\` - Triggered when entitlements for the list of customers got updated. \\* \\`subscription_moved_in\\` - Triggered when a subscription moved from other customer \\* \\`subscription_moved_out\\` - Triggered when a subscription moved to other customer \\* \\`subscription_movement_failed\\` - Triggered when a subscription movement failed \\* \\`omnichannel_subscription_created\\` - Triggered when an omnichannel subscription is created \\* \\`omnichannel_subscription_item_renewed\\` - Triggered when an omnichannel subscription item is renewed \\* \\`omnichannel_subscription_item_downgrade_scheduled\\` - \\*\\*(Deprecated)\\*\\* Triggered when an omnichannel subscription item is downgrade is scheduled \\* \\`omnichannel_subscription_item_scheduled_downgrade_removed\\` - \\*\\*(Deprecated)\\*\\* Triggered when an omnichannel subscription item scheduled downgrade is removed \\* \\`omnichannel_subscription_item_downgraded\\` - Triggered when an omnichannel subscription item is downgraded \\* \\`omnichannel_subscription_item_expired\\` - Triggered when an omnichannel subscription item is expired \\* \\`omnichannel_subscription_item_cancellation_scheduled\\` - Triggered when an omnichannel subscription item is scheduled for cancellation \\* \\`omnichannel_subscription_item_scheduled_cancellation_removed\\` - Triggered when an omnichannel subscription item scheduled cancellation is removed \\* \\`omnichannel_subscription_item_resubscribed\\` - Triggered when an omnichannel subscription item is resubscribed \\* \\`omnichannel_subscription_item_upgraded\\` - Triggered when an omnichannel subscription item is upgraded \\* \\`omnichannel_subscription_item_cancelled\\` - Triggered when an omnichannel subscription item is cancelled \\* \\`omnichannel_subscription_imported\\` - Triggered when an omnichannel subscription item is imported \\* \\`omnichannel_subscription_item_grace_period_started\\` - Triggered when an omnichannel subscription item's grace period has started \\* \\`omnichannel_subscription_item_grace_period_expired\\` - Triggered when an omnichannel subscription item's grace period has expired \\* \\`omnichannel_subscription_item_dunning_started\\` - Triggered when an omnichannel subscription item's dunning has started \\* \\`omnichannel_subscription_item_dunning_expired\\` - Triggered when an omnichannel subscription item's dunning has expired \\* \\`rule_created\\` - Triggered when a rule is created \\* \\`rule_updated\\` - Triggered when a rule is updated \\* \\`rule_deleted\\` - Triggered when a rule is deleted \\* \\`record_purchase_failed\\` - Triggered when an omnichannel record purchase is failed \\* \\`omnichannel_subscription_item_change_scheduled\\` - Triggered when an omnichannel subscription item change is scheduled \\* \\`omnichannel_subscription_item_scheduled_change_removed\\` - Triggered when an omnichannel subscription item scheduled change is removed \\* \\`omnichannel_subscription_item_reactivated\\` - Triggered when an omnichannel subscription item's refund is reversed \\* \\`sales_order_created\\` - Triggered when sales order is created \\* \\`sales_order_updated\\` - Triggered when sales order is updated \\* \\`omnichannel_subscription_item_changed\\` - Triggered when an omnichannel subscription item is changed \\* \\`omnichannel_subscription_item_paused\\` - Triggered when an omnichannel subscription item is paused \\* \\`omnichannel_subscription_item_resumed\\` - Triggered when an omnichannel subscription item is resumed \\* \\`omnichannel_one_time_order_created\\` - Triggered when an omnichannel one time order is created \\* \\`omnichannel_one_time_order_item_cancelled\\` - Triggered when an omnichannel one time order item is cancelled \\* \\`usage_file_ingested\\` - Triggered when a usage file is ingested \\* \\`omnichannel_subscription_item_pause_scheduled\\` - Triggered when an omnichannel subscription item scheduled for pause \\* \\`omnichannel_subscription_moved_in\\` - Triggered when an omnichannel subscription is moved into another customer \\* \\`omnichannel_transaction_created\\` - Triggered when an omnichannel transaction is created \\* \\`alert_status_changed\\` - Triggered when the status for an alert changes \\* \\`omnichannel_subscription_item_updated\\` - Triggered when an omnichannel subscription item is updated \\* \\`omnichannel_subscription_item_recovered\\` - Triggered when an omnichannel subscription item is recovered from grace period or dunning \\* \\`omnichannel_subscription_item_mrr_updated\\` - Triggered when an omnichannel subscription item's MRR is updated \\* \\`ledger_account_balance_updated\\` - Triggered when a ledger account balance changes for a subscription unit. \\* \\`grant_blocks_created\\` - Triggered when one or more grant blocks are created for a subscription unit. \\* \\`grant_blocks_updated\\` - Triggered when one or more grant blocks are updated for a subscription unit. \\* \\`ledger_updated\\` - Triggered when a batch of ledger operations is persisted for a subscription unit. \\* \\`vault_token_created\\` - Triggered when a payment method is tokenized and stored in the vault. \\* \\`vault_token_updated\\` - Triggered when a vaulted payment method is updated. \\* \\`vault_token_deleted\\` - Triggered when a vaulted payment method is deleted from the vault.\n", "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "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_items_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|payment_schedules_created|payment_schedules_updated|payment_schedule_scheme_created|payment_schedule_scheme_deleted|subscription_renewal_reminder|add_usages_reminder|payment_due_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|dunning_updated|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|subscription_entitlements_updated|business_entity_created|business_entity_updated|business_entity_deleted|customer_business_entity_changed|subscription_business_entity_changed|payment_source_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|subscription_ramp_created|subscription_ramp_deleted|subscription_ramp_applied|subscription_ramp_drafted|subscription_ramp_updated|price_variant_created|price_variant_updated|price_variant_deleted|customer_entitlements_updated|subscription_moved_in|subscription_moved_out|subscription_movement_failed|omnichannel_subscription_created|omnichannel_subscription_item_renewed|omnichannel_subscription_item_downgrade_scheduled|omnichannel_subscription_item_scheduled_downgrade_removed|omnichannel_subscription_item_downgraded|omnichannel_subscription_item_expired|omnichannel_subscription_item_cancellation_scheduled|omnichannel_subscription_item_scheduled_cancellation_removed|omnichannel_subscription_item_resubscribed|omnichannel_subscription_item_upgraded|omnichannel_subscription_item_cancelled|omnichannel_subscription_imported|omnichannel_subscription_item_grace_period_started|omnichannel_subscription_item_grace_period_expired|omnichannel_subscription_item_dunning_started|omnichannel_subscription_item_dunning_expired|rule_created|rule_updated|rule_deleted|record_purchase_failed|omnichannel_subscription_item_change_scheduled|omnichannel_subscription_item_scheduled_change_removed|omnichannel_subscription_item_reactivated|sales_order_created|sales_order_updated|omnichannel_subscription_item_changed|omnichannel_subscription_item_paused|omnichannel_subscription_item_resumed|omnichannel_one_time_order_created|omnichannel_one_time_order_item_cancelled|usage_file_ingested|omnichannel_subscription_item_pause_scheduled|omnichannel_subscription_moved_in|omnichannel_transaction_created|alert_status_changed|omnichannel_subscription_item_updated|omnichannel_subscription_item_recovered|omnichannel_subscription_item_mrr_updated|ledger_account_balance_updated|grant_blocks_created|grant_blocks_updated|ledger_updated|vault_token_created|vault_token_updated|vault_token_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_items_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|payment_schedules_created|payment_schedules_updated|payment_schedule_scheme_created|payment_schedule_scheme_deleted|subscription_renewal_reminder|add_usages_reminder|payment_due_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|dunning_updated|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|subscription_entitlements_updated|business_entity_created|business_entity_updated|business_entity_deleted|customer_business_entity_changed|subscription_business_entity_changed|payment_source_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|subscription_ramp_created|subscription_ramp_deleted|subscription_ramp_applied|subscription_ramp_drafted|subscription_ramp_updated|price_variant_created|price_variant_updated|price_variant_deleted|customer_entitlements_updated|subscription_moved_in|subscription_moved_out|subscription_movement_failed|omnichannel_subscription_created|omnichannel_subscription_item_renewed|omnichannel_subscription_item_downgrade_scheduled|omnichannel_subscription_item_scheduled_downgrade_removed|omnichannel_subscription_item_downgraded|omnichannel_subscription_item_expired|omnichannel_subscription_item_cancellation_scheduled|omnichannel_subscription_item_scheduled_cancellation_removed|omnichannel_subscription_item_resubscribed|omnichannel_subscription_item_upgraded|omnichannel_subscription_item_cancelled|omnichannel_subscription_imported|omnichannel_subscription_item_grace_period_started|omnichannel_subscription_item_grace_period_expired|omnichannel_subscription_item_dunning_started|omnichannel_subscription_item_dunning_expired|rule_created|rule_updated|rule_deleted|record_purchase_failed|omnichannel_subscription_item_change_scheduled|omnichannel_subscription_item_scheduled_change_removed|omnichannel_subscription_item_reactivated|sales_order_created|sales_order_updated|omnichannel_subscription_item_changed|omnichannel_subscription_item_paused|omnichannel_subscription_item_resumed|omnichannel_one_time_order_created|omnichannel_one_time_order_item_cancelled|usage_file_ingested|omnichannel_subscription_item_pause_scheduled|omnichannel_subscription_moved_in|omnichannel_transaction_created|alert_status_changed|omnichannel_subscription_item_updated|omnichannel_subscription_item_recovered|omnichannel_subscription_item_mrr_updated|ledger_account_balance_updated|grant_blocks_created|grant_blocks_updated|ledger_updated|vault_token_created|vault_token_updated|vault_token_deleted))*\\]$", "example" : null }, "not_in" : { "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_items_renewed\\` - Sent when one or more Subscription Items are renewed \\* \\`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 \\* \\`payment_schedules_created\\` - Event triggered when new payment schedules are created for an invoice \\* \\`payment_schedules_updated\\` - Event triggered when payment schedules are updated for an invoice \\* \\`payment_schedule_scheme_created\\` - Event triggered when a new payment schedule scheme is created \\* \\`payment_schedule_scheme_deleted\\` - Event triggered when a payment schedule scheme 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 \\* \\`payment_due_reminder\\` - Sent after scheduled days of payment failure \\* \\`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 \\* \\`dunning_updated\\` - Sent when dunning is paused for an invoice \\* \\`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 \\* \\`subscription_entitlements_updated\\` - Triggered when subscription entitlements are updated due to the subscription change event \\* \\`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. \\* \\`payment_source_business_entity_changed\\` - Sent when a payment source'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 \\* \\`subscription_ramp_created\\` - Triggered when a subscription ramp is created. \\* \\`subscription_ramp_deleted\\` - Triggered when a subscription ramp is deleted. \\* \\`subscription_ramp_applied\\` - Triggered when a subscription ramp is applied. \\* \\`subscription_ramp_drafted\\` - Triggered when a subscription ramp is moved to draft status. \\* \\`subscription_ramp_updated\\` - Triggered when a subscription ramp is updated. \\* \\`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. \\* \\`customer_entitlements_updated\\` - Triggered when entitlements for the list of customers got updated. \\* \\`subscription_moved_in\\` - Triggered when a subscription moved from other customer \\* \\`subscription_moved_out\\` - Triggered when a subscription moved to other customer \\* \\`subscription_movement_failed\\` - Triggered when a subscription movement failed \\* \\`omnichannel_subscription_created\\` - Triggered when an omnichannel subscription is created \\* \\`omnichannel_subscription_item_renewed\\` - Triggered when an omnichannel subscription item is renewed \\* \\`omnichannel_subscription_item_downgrade_scheduled\\` - \\*\\*(Deprecated)\\*\\* Triggered when an omnichannel subscription item is downgrade is scheduled \\* \\`omnichannel_subscription_item_scheduled_downgrade_removed\\` - \\*\\*(Deprecated)\\*\\* Triggered when an omnichannel subscription item scheduled downgrade is removed \\* \\`omnichannel_subscription_item_downgraded\\` - Triggered when an omnichannel subscription item is downgraded \\* \\`omnichannel_subscription_item_expired\\` - Triggered when an omnichannel subscription item is expired \\* \\`omnichannel_subscription_item_cancellation_scheduled\\` - Triggered when an omnichannel subscription item is scheduled for cancellation \\* \\`omnichannel_subscription_item_scheduled_cancellation_removed\\` - Triggered when an omnichannel subscription item scheduled cancellation is removed \\* \\`omnichannel_subscription_item_resubscribed\\` - Triggered when an omnichannel subscription item is resubscribed \\* \\`omnichannel_subscription_item_upgraded\\` - Triggered when an omnichannel subscription item is upgraded \\* \\`omnichannel_subscription_item_cancelled\\` - Triggered when an omnichannel subscription item is cancelled \\* \\`omnichannel_subscription_imported\\` - Triggered when an omnichannel subscription item is imported \\* \\`omnichannel_subscription_item_grace_period_started\\` - Triggered when an omnichannel subscription item's grace period has started \\* \\`omnichannel_subscription_item_grace_period_expired\\` - Triggered when an omnichannel subscription item's grace period has expired \\* \\`omnichannel_subscription_item_dunning_started\\` - Triggered when an omnichannel subscription item's dunning has started \\* \\`omnichannel_subscription_item_dunning_expired\\` - Triggered when an omnichannel subscription item's dunning has expired \\* \\`rule_created\\` - Triggered when a rule is created \\* \\`rule_updated\\` - Triggered when a rule is updated \\* \\`rule_deleted\\` - Triggered when a rule is deleted \\* \\`record_purchase_failed\\` - Triggered when an omnichannel record purchase is failed \\* \\`omnichannel_subscription_item_change_scheduled\\` - Triggered when an omnichannel subscription item change is scheduled \\* \\`omnichannel_subscription_item_scheduled_change_removed\\` - Triggered when an omnichannel subscription item scheduled change is removed \\* \\`omnichannel_subscription_item_reactivated\\` - Triggered when an omnichannel subscription item's refund is reversed \\* \\`sales_order_created\\` - Triggered when sales order is created \\* \\`sales_order_updated\\` - Triggered when sales order is updated \\* \\`omnichannel_subscription_item_changed\\` - Triggered when an omnichannel subscription item is changed \\* \\`omnichannel_subscription_item_paused\\` - Triggered when an omnichannel subscription item is paused \\* \\`omnichannel_subscription_item_resumed\\` - Triggered when an omnichannel subscription item is resumed \\* \\`omnichannel_one_time_order_created\\` - Triggered when an omnichannel one time order is created \\* \\`omnichannel_one_time_order_item_cancelled\\` - Triggered when an omnichannel one time order item is cancelled \\* \\`usage_file_ingested\\` - Triggered when a usage file is ingested \\* \\`omnichannel_subscription_item_pause_scheduled\\` - Triggered when an omnichannel subscription item scheduled for pause \\* \\`omnichannel_subscription_moved_in\\` - Triggered when an omnichannel subscription is moved into another customer \\* \\`omnichannel_transaction_created\\` - Triggered when an omnichannel transaction is created \\* \\`alert_status_changed\\` - Triggered when the status for an alert changes \\* \\`omnichannel_subscription_item_updated\\` - Triggered when an omnichannel subscription item is updated \\* \\`omnichannel_subscription_item_recovered\\` - Triggered when an omnichannel subscription item is recovered from grace period or dunning \\* \\`omnichannel_subscription_item_mrr_updated\\` - Triggered when an omnichannel subscription item's MRR is updated \\* \\`ledger_account_balance_updated\\` - Triggered when a ledger account balance changes for a subscription unit. \\* \\`grant_blocks_created\\` - Triggered when one or more grant blocks are created for a subscription unit. \\* \\`grant_blocks_updated\\` - Triggered when one or more grant blocks are updated for a subscription unit. \\* \\`ledger_updated\\` - Triggered when a batch of ledger operations is persisted for a subscription unit. \\* \\`vault_token_created\\` - Triggered when a payment method is tokenized and stored in the vault. \\* \\`vault_token_updated\\` - Triggered when a vaulted payment method is updated. \\* \\`vault_token_deleted\\` - Triggered when a vaulted payment method is deleted from the vault.\n", "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "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_items_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|payment_schedules_created|payment_schedules_updated|payment_schedule_scheme_created|payment_schedule_scheme_deleted|subscription_renewal_reminder|add_usages_reminder|payment_due_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|dunning_updated|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|subscription_entitlements_updated|business_entity_created|business_entity_updated|business_entity_deleted|customer_business_entity_changed|subscription_business_entity_changed|payment_source_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|subscription_ramp_created|subscription_ramp_deleted|subscription_ramp_applied|subscription_ramp_drafted|subscription_ramp_updated|price_variant_created|price_variant_updated|price_variant_deleted|customer_entitlements_updated|subscription_moved_in|subscription_moved_out|subscription_movement_failed|omnichannel_subscription_created|omnichannel_subscription_item_renewed|omnichannel_subscription_item_downgrade_scheduled|omnichannel_subscription_item_scheduled_downgrade_removed|omnichannel_subscription_item_downgraded|omnichannel_subscription_item_expired|omnichannel_subscription_item_cancellation_scheduled|omnichannel_subscription_item_scheduled_cancellation_removed|omnichannel_subscription_item_resubscribed|omnichannel_subscription_item_upgraded|omnichannel_subscription_item_cancelled|omnichannel_subscription_imported|omnichannel_subscription_item_grace_period_started|omnichannel_subscription_item_grace_period_expired|omnichannel_subscription_item_dunning_started|omnichannel_subscription_item_dunning_expired|rule_created|rule_updated|rule_deleted|record_purchase_failed|omnichannel_subscription_item_change_scheduled|omnichannel_subscription_item_scheduled_change_removed|omnichannel_subscription_item_reactivated|sales_order_created|sales_order_updated|omnichannel_subscription_item_changed|omnichannel_subscription_item_paused|omnichannel_subscription_item_resumed|omnichannel_one_time_order_created|omnichannel_one_time_order_item_cancelled|usage_file_ingested|omnichannel_subscription_item_pause_scheduled|omnichannel_subscription_moved_in|omnichannel_transaction_created|alert_status_changed|omnichannel_subscription_item_updated|omnichannel_subscription_item_recovered|omnichannel_subscription_item_mrr_updated|ledger_account_balance_updated|grant_blocks_created|grant_blocks_updated|ledger_updated|vault_token_created|vault_token_updated|vault_token_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_items_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|payment_schedules_created|payment_schedules_updated|payment_schedule_scheme_created|payment_schedule_scheme_deleted|subscription_renewal_reminder|add_usages_reminder|payment_due_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|dunning_updated|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|subscription_entitlements_updated|business_entity_created|business_entity_updated|business_entity_deleted|customer_business_entity_changed|subscription_business_entity_changed|payment_source_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|subscription_ramp_created|subscription_ramp_deleted|subscription_ramp_applied|subscription_ramp_drafted|subscription_ramp_updated|price_variant_created|price_variant_updated|price_variant_deleted|customer_entitlements_updated|subscription_moved_in|subscription_moved_out|subscription_movement_failed|omnichannel_subscription_created|omnichannel_subscription_item_renewed|omnichannel_subscription_item_downgrade_scheduled|omnichannel_subscription_item_scheduled_downgrade_removed|omnichannel_subscription_item_downgraded|omnichannel_subscription_item_expired|omnichannel_subscription_item_cancellation_scheduled|omnichannel_subscription_item_scheduled_cancellation_removed|omnichannel_subscription_item_resubscribed|omnichannel_subscription_item_upgraded|omnichannel_subscription_item_cancelled|omnichannel_subscription_imported|omnichannel_subscription_item_grace_period_started|omnichannel_subscription_item_grace_period_expired|omnichannel_subscription_item_dunning_started|omnichannel_subscription_item_dunning_expired|rule_created|rule_updated|rule_deleted|record_purchase_failed|omnichannel_subscription_item_change_scheduled|omnichannel_subscription_item_scheduled_change_removed|omnichannel_subscription_item_reactivated|sales_order_created|sales_order_updated|omnichannel_subscription_item_changed|omnichannel_subscription_item_paused|omnichannel_subscription_item_resumed|omnichannel_one_time_order_created|omnichannel_one_time_order_item_cancelled|usage_file_ingested|omnichannel_subscription_item_pause_scheduled|omnichannel_subscription_moved_in|omnichannel_transaction_created|alert_status_changed|omnichannel_subscription_item_updated|omnichannel_subscription_item_recovered|omnichannel_subscription_item_mrr_updated|ledger_account_balance_updated|grant_blocks_created|grant_blocks_updated|ledger_updated|vault_token_created|vault_token_updated|vault_token_deleted))*\\]$", "example" : null } } } }, { "name" : "source", "in" : "query", "description" : "optional, enumerated string filter\n\nSource of the event. Possible values are : admin_console, api, scheduled_job, hosted_page, portal, system, none, js_api, migration, bulk_operation, external_service.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*source\\[is_not\\] = \"hosted_page\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "hosted_page", "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\\` - Operation that was triggered triggered by the migration of customer data into Chargebee Billing, either from an external system or from another [Chargebee Billing site](https://www.chargebee.com/docs/billing/2.0/getting-started/sites-intro.html) (such as test, live, or sandbox). \\* \\`bulk_operation\\` - Operation that are triggerd through bulk operation. \\* \\`external_service\\` - Operation that are triggered via webhook\n", "enum" : [ "admin_console", "api", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "bulk_operation", "external_service" ], "example" : null }, "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\\` - Operation that was triggered triggered by the migration of customer data into Chargebee Billing, either from an external system or from another [Chargebee Billing site](https://www.chargebee.com/docs/billing/2.0/getting-started/sites-intro.html) (such as test, live, or sandbox). \\* \\`bulk_operation\\` - Operation that are triggerd through bulk operation. \\* \\`external_service\\` - Operation that are triggered via webhook\n", "enum" : [ "admin_console", "api", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "bulk_operation", "external_service" ], "example" : null }, "in" : { "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\\` - Operation that was triggered triggered by the migration of customer data into Chargebee Billing, either from an external system or from another [Chargebee Billing site](https://www.chargebee.com/docs/billing/2.0/getting-started/sites-intro.html) (such as test, live, or sandbox). \\* \\`bulk_operation\\` - Operation that are triggerd through bulk operation. \\* \\`external_service\\` - Operation that are triggered via webhook\n", "enum" : [ "admin_console", "api", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "bulk_operation", "external_service" ], "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))*\\]$", "example" : null }, "not_in" : { "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\\` - Operation that was triggered triggered by the migration of customer data into Chargebee Billing, either from an external system or from another [Chargebee Billing site](https://www.chargebee.com/docs/billing/2.0/getting-started/sites-intro.html) (such as test, live, or sandbox). \\* \\`bulk_operation\\` - Operation that are triggerd through bulk operation. \\* \\`external_service\\` - Operation that are triggered via webhook\n", "enum" : [ "admin_console", "api", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "bulk_operation", "external_service" ], "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))*\\]$", "example" : null } } } }, { "name" : "occurred_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this event had occurred.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*occurred_at\\[after\\] = \"1349116200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1349116200", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\noccurred_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"occurred_at\"*\n\nThis will sort the result based on the 'occurred_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "occurred_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "occurred_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "event" : { "$ref" : "#/components/schemas/Event", "description" : "Resource object representing event" } }, "required" : [ "event" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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. \n**Note:**\nOnly events that are less than 90 days old will be retrieved.\n", "operationId" : "retrieve_an_event", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "event-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/event-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "event" : { "$ref" : "#/components/schemas/Event", "description" : "

Resource object representing event

" } }, "required" : [ "event" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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](/docs/api/v2/pcv-1/comments/create-a-comment#entity_type) identified by comment ID.\n\nOnly the comments that are added via Admin console and API can be deleted. Chargebee generated \"System\" comments cannot be deleted.\n", "operationId" : "delete_a_comment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "comment-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/comment-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "comment" : { "$ref" : "#/components/schemas/Comment", "description" : "

Resource object representing comment

" } }, "required" : [ "comment" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_comment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "comment-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/comment-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "comment" : { "$ref" : "#/components/schemas/Comment", "description" : "

Resource object representing comment

" } }, "required" : [ "comment" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nIf you want to retrieve the list of comments for an [entity](/docs/api/v2/pcv-1/comments/list-comments), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.\n", "operationId" : "list_comments", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "entity_type", "in" : "query", "description" : "Type of the entity this comment generated for.\n\\* item -\n\nEntity that represents item\n\\* order -\n\nEntity that represents an order\n\\* item_price -\n\nEntity that represents item price\n\\* customer -\n\nEntity that represents a customer\n\\* invoice -\n\nInvoice description\n\\* business_entity -\n\nEntity that represents item of type business entity\n\\* plan -\n\nEntity that represents a subscription plan\n\\* price_variant -\n\nEntity that represents a price variant\n\\* coupon -\n\nEntity that represents a discount coupon\n\\* subscription -\n\nEntity that represents a subscription of a customer\n\\* item_family -\n\nEntity that represents item family\n\\* transaction -\n\nEntity that represents a transaction.\n\\* addon -\n\nEntity that represents an addon\n\\* credit_note -\n\nCredit note description\n\\* quote -\n\nEntity that represents a quote\n", "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" ], "example" : null } }, { "name" : "entity_id", "in" : "query", "description" : "Unique identifier of the entity.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe time at which this comment was created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[on\\] = \"1456332678\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1456332678", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "comment" : { "$ref" : "#/components/schemas/Comment", "description" : "Resource object representing comment" } }, "required" : [ "comment" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "create_a_comment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Type of the entity to create the comment for.\n\\* item -\n\nEntity that represents item\n\\* order -\n\nEntity that represents an order\n\\* item_price -\n\nEntity that represents item price\n\\* customer -\n\nEntity that represents a customer\n\\* invoice -\n\nInvoice description\n\\* business_entity -\n\nEntity that represents item of type business entity\n\\* plan -\n\nEntity that represents a subscription plan\n\\* price_variant -\n\nEntity that represents a price variant\n\\* coupon -\n\nEntity that represents a discount coupon\n\\* subscription -\n\nEntity that represents a subscription of a customer\n\\* item_family -\n\nEntity that represents item family\n\\* transaction -\n\nEntity that represents a transaction.\n\\* addon -\n\nEntity that represents an addon\n\\* credit_note -\n\nCredit note description\n\\* quote -\n\nEntity that represents a quote\n", "enum" : [ "customer", "subscription", "invoice", "quote", "credit_note", "transaction", "plan", "addon", "coupon", "order", "business_entity", "item_family", "item", "item_price", "price_variant" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the entity.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Actual notes for the comment.\n", "maxLength" : 1000, "example" : null }, "added_by" : { "type" : "string", "deprecated" : false, "description" : "The user who created the comment. If created via API, this contains the name given for the API key used.\n", "maxLength" : 100, "example" : null } }, "required" : [ "entity_id", "entity_type", "notes" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "comment" : { "$ref" : "#/components/schemas/Comment", "description" : "

Resource object representing comment

" } }, "required" : [ "comment" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "create_a_portal_session", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "URL to redirect when the user logs out from the portal.\n", "maxLength" : 250, "example" : null }, "forward_url" : { "type" : "string", "deprecated" : false, "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:**\nThis parameter is not applicable for [in-app](https://www.chargebee.com/docs/v3-self-serve-portal.html)\nportal.\n", "maxLength" : 250, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "portal_session" : { "$ref" : "#/components/schemas/PortalSession", "description" : "

Resource object representing portal_session

" } }, "required" : [ "portal_session" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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:\n\n* **auth_session_id** - this should be sent as part of the endpoint.\n* **auth_session_token** - this should be sent as value for the input parameter **token**.\n\n**Note:** This API is not applicable for [in-app](https://www.chargebee.com/docs/v3-self-serve-portal.html) portal.\n", "operationId" : "activate_a_portal_session", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" :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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "portal-session-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/portal-session-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "token" : { "type" : "string", "deprecated" : false, "description" : "Unique pre-authenticated portal session token to access customer portal directly.\n", "maxLength" : 70, "example" : null } }, "required" : [ "token" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "portal_session" : { "$ref" : "#/components/schemas/PortalSession", "description" : "

Resource object representing portal_session

" } }, "required" : [ "portal_session" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\nIf this API is called for a Portal Session that currently is in :\n\n* \"created\" status, the session status will be marked as \"logged_out\" and the access URL will become invalid.\n* \"logged_in\" status, the session status will be marked as \"logged_out\" and customer will not be able to use that session.\n* \"logged_out\" status, this will return normally without changing any attribute of this resource.\n", "operationId" : "logout_a_portal_session", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "portal-session-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/portal-session-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "portal_session" : { "$ref" : "#/components/schemas/PortalSession", "description" : "

Resource object representing portal_session

" } }, "required" : [ "portal_session" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nas 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "portal-session-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/portal-session-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "portal_session" : { "$ref" : "#/components/schemas/PortalSession", "description" : "

Resource object representing portal_session

" } }, "required" : [ "portal_session" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_site_migration_details", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "entity_id_at_other_site", "in" : "query", "description" : "optional, string filter\n\nEntity Id of the record in the other site.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*entity_id_at_other_site\\[is\\] = \"null\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "other_site_name", "in" : "query", "description" : "optional, string filter\n\nSite name to which the record is moved in/out.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*other_site_name\\[is\\] = \"acme-test\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "acme-test", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "entity_id", "in" : "query", "description" : "optional, string filter\n\nId of the entity in this site.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*entity_id\\[is\\] = \"8axqwer7as\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8axqwer7as", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "entity_type", "in" : "query", "description" : "optional, enumerated string filter\n\nEntity Type of the record. Possible values are : customer, subscription, invoice, credit_note, transaction, order.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*entity_type\\[is\\] = \"customer\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "customer", "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\n", "enum" : [ "customer", "subscription", "invoice", "credit_note", "transaction", "order" ], "example" : null }, "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\n", "enum" : [ "customer", "subscription", "invoice", "credit_note", "transaction", "order" ], "example" : null }, "in" : { "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\n", "enum" : [ "customer", "subscription", "invoice", "credit_note", "transaction", "order" ], "pattern" : "^\\[(customer|subscription|invoice|credit_note|transaction|order)(,(customer|subscription|invoice|credit_note|transaction|order))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "customer", "subscription", "invoice", "credit_note", "transaction", "order" ], "pattern" : "^\\[(customer|subscription|invoice|credit_note|transaction|order)(,(customer|subscription|invoice|credit_note|transaction|order))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nStatus of the migration. Possible values are : moved_in, moved_out, moving_out.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"MOVED_OUT\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "MOVED_OUT", "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\n", "enum" : [ "moved_in", "moved_out", "moving_out" ], "example" : null }, "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\n", "enum" : [ "moved_in", "moved_out", "moving_out" ], "example" : null }, "in" : { "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\n", "enum" : [ "moved_in", "moved_out", "moving_out" ], "pattern" : "^\\[(moved_in|moved_out|moving_out)(,(moved_in|moved_out|moving_out))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "moved_in", "moved_out", "moving_out" ], "pattern" : "^\\[(moved_in|moved_out|moving_out)(,(moved_in|moved_out|moving_out))*\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "site_migration_detail" : { "$ref" : "#/components/schemas/SiteMigrationDetail", "description" : "Resource object representing site_migration_detail" } }, "required" : [ "site_migration_detail" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_latest_migration_details", "parameters" : [ { "name" : "from_site", "in" : "query", "description" : "Domain name to which the item is moved.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "minLength" : 4, "example" : null } }, { "name" : "entity_type", "in" : "query", "description" : "Type of the entity this record is stored for.\n\\* customer -\n\nEntity that represents a customer\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "enum" : [ "customer" ], "example" : null } }, { "name" : "entity_id", "in" : "query", "description" : "Handle of the customer in the current site.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "resource_migration" : { "$ref" : "#/components/schemas/ResourceMigration", "description" : "

Resource object representing resource_migration

" } }, "required" : [ "resource_migration" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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'.\n", "operationId" : "retrieve_a_time_machine", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "time-machine-name", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/time-machine-name", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "time_machine" : { "$ref" : "#/components/schemas/TimeMachine", "description" : "

Resource object representing time_machine

" } }, "required" : [ "time_machine" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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**\n.\nYou need to check if the \"start afresh\" operation has completed by checking if the time travel status is **successful**\nby retrieving the time machine in a loop with a minimum delay of 3 secs between two retrieve requests.\nUse 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.\n", "operationId" : "travel_forward", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "time-machine-name", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/time-machine-name", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "destination_time" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The **time**\nto travel to. Should be between the 'current' destination time of the time machine and present time.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "time_machine" : { "$ref" : "#/components/schemas/TimeMachine", "description" : "

Resource object representing time_machine

" } }, "required" : [ "time_machine" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\n**Note:**\nThis API call is asynchronous.\nYou need to check if the \"start afresh\" operation has completed by checking if the time travel status is **successful**\nby 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**\nfunction provided as a instance method in the library.\nUse 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.\n", "operationId" : "start_afresh", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "time-machine-name", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/time-machine-name", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "genesis_time" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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\n**Note:**\nCan only be in the past.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "time_machine" : { "$ref" : "#/components/schemas/TimeMachine", "description" : "

Resource object representing time_machine

" } }, "required" : [ "time_machine" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_customers", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "export_type" : { "type" : "string", "default" : "data", "deprecated" : false, "description" : "

Determines the format of the data. Returns the export type based on the selected value.

\n* data -

Provides the full set of data for the customers in multiple .csv files.

\n* import_friendly_data -

Provides a .csv file whose columns match the customer schema. This file format can be readily imported through the UI by using Bulk Operations.

", "enum" : [ "data", "import_friendly_data" ], "example" : null }, "business_entity_id" : { "type" : "object", "deprecated" : false, "description" : "optional, string filter The unique ID of the \\[business entity\\](/docs/api/getting-started) of this subscription. This is always the same as the \\[business entity\\](/docs/api/subscriptions/subscription-object#customer_id) of the customer. \\*\\*Supported operators :\\*\\* is, is_not, starts_with \\*\\*Example →\\*\\* \\*business_entity_id\\\\\\[is\\\\\\] = \"business_entity_id\"\\*\n", "example" : "business_entity_id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Identifier of the customer.\n", "example" : "9bsvnHgsvmsI", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "first_name" : { "type" : "object", "deprecated" : false, "description" : "First name of the customer\n", "example" : "John", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "last_name" : { "type" : "object", "deprecated" : false, "description" : "Last name of the customer\n", "example" : "Clint", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "email" : { "type" : "object", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "example" : "john@test.com", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "company" : { "type" : "object", "deprecated" : false, "description" : "Company name of the customer.\n", "example" : "Globex Corp", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "phone" : { "type" : "object", "deprecated" : false, "description" : "Phone number of the customer\n", "example" : "(541) 754-3010", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "auto_collection" : { "type" : "object", "deprecated" : false, "description" : "Whether payments needs to be collected automatically for this customer\n", "example" : "on", "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.\n", "enum" : [ "on", "off" ], "example" : null }, "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.\n", "enum" : [ "on", "off" ], "example" : null }, "in" : { "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.\n", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null } } }, "taxability" : { "type" : "object", "deprecated" : false, "description" : "Specifies if the customer is liable for tax\n", "example" : "taxable", "properties" : { "is" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null } } }, "created_at" : { "type" : "object", "deprecated" : false, "description" : "Timestamp indicating when this customer resource is created.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "offline_payment_method" : { "type" : "object", "deprecated" : false, "description" : "The preferred offline payment method for the customer.\n", "example" : "cash", "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\n", "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" ], "example" : null }, "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\n", "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" ], "example" : null }, "in" : { "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\n", "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" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "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" ], "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))*\\]$", "example" : null } } }, "auto_close_invoices" : { "type" : "object", "deprecated" : false, "description" : "Override for this customer, the \\[site-level setting\\](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#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/subscription-object#auto_close_invoices) which takes precedence.\n", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null }, "relationship" : { "type" : "object", "deprecated" : false, "description" : "Parameters for relationship\n", "properties" : { "parent_id" : { "type" : "object", "deprecated" : false, "description" : "Immediate parent with whom we will link our new customer(child)\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "payment_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to pay\n", "example" : "active1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "invoice_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to handle invoices\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "relationship" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_attached_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "item_type" : { "type" : "object", "deprecated" : false, "description" : "

optional, enumerated string filter

\n

To filter based on the type of of the attached item. Possible values are : addon\n, charge.\nPossible values are : plan, addon, charge.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nitem_type[is_not] = "plan"

", "example" : "plan", "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null } } }, "attached_item" : { "type" : "object", "deprecated" : false, "description" : "Parameters for attached_item\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Filter attached items based on their id.\n", "example" : "bec0c324-adb6-44d3-ad4f-694f449be97c", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "item_id" : { "type" : "object", "deprecated" : false, "description" : "

Filter attached items based on the item_id\nof the item being attached.

", "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "type" : { "type" : "object", "deprecated" : false, "description" : "

Filter attached items based on the type\nof attached item. Possible values are : recommended\n, mandatory\n, optional\n.

", "example" : "mandatory", "properties" : { "is" : { "type" : "string", "description" : "* `recommended` - The addon is recommended to go with the plan-item when using Checkout or Portal.\n* `mandatory` - The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API.\n* `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" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `recommended` - The addon is recommended to go with the plan-item when using Checkout or Portal.\n* `mandatory` - The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API.\n* `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" ], "example" : null }, "in" : { "type" : "string", "description" : "* `recommended` - The addon is recommended to go with the plan-item when using Checkout or Portal.\n* `mandatory` - The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API.\n* `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" ], "pattern" : "^\\[(recommended|mandatory|optional)(,(recommended|mandatory|optional))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `recommended` - The addon is recommended to go with the plan-item when using Checkout or Portal.\n* `mandatory` - The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API.\n* `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" ], "pattern" : "^\\[(recommended|mandatory|optional)(,(recommended|mandatory|optional))*\\]$", "example" : null } } }, "charge_on_event" : { "type" : "object", "deprecated" : false, "description" : "Indicates when the item is charged. This attribute only applies to charge-items.\n", "example" : "subscription_creation", "properties" : { "is" : { "type" : "string", "description" : "* `subscription_creation` - the time of creation of the subscription.\n* `subscription_trial_start` - the time when the trial period of the subscription begins.\n* `plan_activation` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed.\n* `subscription_activation` - the moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.\n* `contract_termination` - when a contract term is terminated.\n* `on_demand` - Item can be charged on demand", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `subscription_creation` - the time of creation of the subscription.\n* `subscription_trial_start` - the time when the trial period of the subscription begins.\n* `plan_activation` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed.\n* `subscription_activation` - the moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.\n* `contract_termination` - when a contract term is terminated.\n* `on_demand` - Item can be charged on demand", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "example" : null }, "in" : { "type" : "string", "description" : "* `subscription_creation` - the time of creation of the subscription.\n* `subscription_trial_start` - the time when the trial period of the subscription begins.\n* `plan_activation` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed.\n* `subscription_activation` - the moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.\n* `contract_termination` - when a contract term is terminated.\n* `on_demand` - Item can be charged on demand", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "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))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `subscription_creation` - the time of creation of the subscription.\n* `subscription_trial_start` - the time when the trial period of the subscription begins.\n* `plan_activation` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed.\n* `subscription_activation` - the moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.\n* `contract_termination` - when a contract term is terminated.\n* `on_demand` - Item can be charged on demand", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "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))*\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "Filter attached items based on when the attached items were last updated.\n", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "parent_item_id" : { "type" : "object", "deprecated" : false, "description" : "The id of the plan-item to which the item is attached.\n", "example" : "silver", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "attached_item" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_transactions", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Uniquely identifies the transaction.\n", "example" : "txn_88ybdbsnvf2", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "Identifier of the customer for which this transaction is made\n", "example" : "5hjdk8nOpd", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "subscription_id" : { "type" : "object", "deprecated" : false, "description" : "Identifier of the subscription for which this transaction is made.\n", "example" : "5hjdk8nOpd", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "payment_source_id" : { "type" : "object", "deprecated" : false, "description" : "To filter based on Transaction payment source id.\n", "example" : "pm_3Nl8XXUQUXDVFa2", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "The payment method of this transaction\n", "example" : "card", "properties" : { "is" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay \n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay \n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo \n* `pay_to` - PayTo \n* `faster_payments` - Faster Payments \n* `sepa_instant_transfer` - Sepa Instant Transfer \n* `automated_bank_transfer` - Automated Bank Transfer \n* `klarna_pay_now` - Klarna Pay Now \n* `online_banking_poland` - Online Banking Poland \n* `payconiq_by_bancontact` - Payconiq by Bancontact \n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin \n* `kakao_pay` - Kakao Pay \n* `naver_pay` - Naver Pay \n* `revolut_pay` - Revolut Pay \n* `cash_app_pay` - Cash App Pay \n* `pix` - Payments made via Pix \n* `twint` - Twint \n* `go_pay` - Go Pay \n* `grab_pay` - Grab Pay \n* `pay_co` - Pay Co \n* `after_pay` - After Pay \n* `swish` - Swish \n* `payme` - PayMe \n* `klarna` - Payments made via Klarna \n* `alipay_hk` - Alipay HK \n* `paypay` - PayPay \n* `gcash` - GCash \n* `south_korean_cards` - Payments made via South Korean Cards \n* `paynow` - Payments made via PayNow \n* `bizum` - Payments made via Bizum \n* `promptpay` - Payments made via PromptPay \n* `dana` - Dana \n* `touch_n_go` - Touch 'n Go \n* `tamara` - Tamara \n* `qpay` - Qpay ", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay \n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay \n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo \n* `pay_to` - PayTo \n* `faster_payments` - Faster Payments \n* `sepa_instant_transfer` - Sepa Instant Transfer \n* `automated_bank_transfer` - Automated Bank Transfer \n* `klarna_pay_now` - Klarna Pay Now \n* `online_banking_poland` - Online Banking Poland \n* `payconiq_by_bancontact` - Payconiq by Bancontact \n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin \n* `kakao_pay` - Kakao Pay \n* `naver_pay` - Naver Pay \n* `revolut_pay` - Revolut Pay \n* `cash_app_pay` - Cash App Pay \n* `pix` - Payments made via Pix \n* `twint` - Twint \n* `go_pay` - Go Pay \n* `grab_pay` - Grab Pay \n* `pay_co` - Pay Co \n* `after_pay` - After Pay \n* `swish` - Swish \n* `payme` - PayMe \n* `klarna` - Payments made via Klarna \n* `alipay_hk` - Alipay HK \n* `paypay` - PayPay \n* `gcash` - GCash \n* `south_korean_cards` - Payments made via South Korean Cards \n* `paynow` - Payments made via PayNow \n* `bizum` - Payments made via Bizum \n* `promptpay` - Payments made via PromptPay \n* `dana` - Dana \n* `touch_n_go` - Touch 'n Go \n* `tamara` - Tamara \n* `qpay` - Qpay ", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "in" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay \n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay \n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo \n* `pay_to` - PayTo \n* `faster_payments` - Faster Payments \n* `sepa_instant_transfer` - Sepa Instant Transfer \n* `automated_bank_transfer` - Automated Bank Transfer \n* `klarna_pay_now` - Klarna Pay Now \n* `online_banking_poland` - Online Banking Poland \n* `payconiq_by_bancontact` - Payconiq by Bancontact \n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin \n* `kakao_pay` - Kakao Pay \n* `naver_pay` - Naver Pay \n* `revolut_pay` - Revolut Pay \n* `cash_app_pay` - Cash App Pay \n* `pix` - Payments made via Pix \n* `twint` - Twint \n* `go_pay` - Go Pay \n* `grab_pay` - Grab Pay \n* `pay_co` - Pay Co \n* `after_pay` - After Pay \n* `swish` - Swish \n* `payme` - PayMe \n* `klarna` - Payments made via Klarna \n* `alipay_hk` - Alipay HK \n* `paypay` - PayPay \n* `gcash` - GCash \n* `south_korean_cards` - Payments made via South Korean Cards \n* `paynow` - Payments made via PayNow \n* `bizum` - Payments made via Bizum \n* `promptpay` - Payments made via PromptPay \n* `dana` - Dana \n* `touch_n_go` - Touch 'n Go \n* `tamara` - Tamara \n* `qpay` - Qpay ", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay \n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay \n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo \n* `pay_to` - PayTo \n* `faster_payments` - Faster Payments \n* `sepa_instant_transfer` - Sepa Instant Transfer \n* `automated_bank_transfer` - Automated Bank Transfer \n* `klarna_pay_now` - Klarna Pay Now \n* `online_banking_poland` - Online Banking Poland \n* `payconiq_by_bancontact` - Payconiq by Bancontact \n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin \n* `kakao_pay` - Kakao Pay \n* `naver_pay` - Naver Pay \n* `revolut_pay` - Revolut Pay \n* `cash_app_pay` - Cash App Pay \n* `pix` - Payments made via Pix \n* `twint` - Twint \n* `go_pay` - Go Pay \n* `grab_pay` - Grab Pay \n* `pay_co` - Pay Co \n* `after_pay` - After Pay \n* `swish` - Swish \n* `payme` - PayMe \n* `klarna` - Payments made via Klarna \n* `alipay_hk` - Alipay HK \n* `paypay` - PayPay \n* `gcash` - GCash \n* `south_korean_cards` - Payments made via South Korean Cards \n* `paynow` - Payments made via PayNow \n* `bizum` - Payments made via Bizum \n* `promptpay` - Payments made via PromptPay \n* `dana` - Dana \n* `touch_n_go` - Touch 'n Go \n* `tamara` - Tamara \n* `qpay` - Qpay ", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(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|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null } } }, "gateway" : { "type" : "object", "deprecated" : false, "description" : "Gateway through which this transaction was done. Applicable only for 'Card' Payment Method\n", "example" : "stripe", "properties" : { "is" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `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.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `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. \n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type. \n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network. \n* `ezidebit` - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.
Ezidebit is in beta.
\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `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.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `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. \n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type. \n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network. \n* `ezidebit` - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.
Ezidebit is in beta.
\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "in" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `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.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `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. \n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type. \n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network. \n* `ezidebit` - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.
Ezidebit is in beta.
\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "pattern" : "^\\[(chargebee|chargebee_payments|adyen|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|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|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable)(,(chargebee|chargebee_payments|adyen|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|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|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `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.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `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. \n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type. \n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network. \n* `ezidebit` - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.
Ezidebit is in beta.
\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "pattern" : "^\\[(chargebee|chargebee_payments|adyen|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|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|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable)(,(chargebee|chargebee_payments|adyen|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|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|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable))*\\]$", "example" : null } } }, "gateway_account_id" : { "type" : "object", "deprecated" : false, "description" : "The gateway account used for this transaction\n", "example" : "gw_3Nl9BNeQ7438Ks1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "id_at_gateway" : { "type" : "object", "deprecated" : false, "description" : "The id with which this transaction is referred in gateway.\n", "example" : "txn_5678HJS89900", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "reference_number" : { "type" : "object", "deprecated" : false, "description" : "

The reference number for this transaction. For example, the check number when payment_method\n= check\n.

", "example" : "cus_u239732", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "type" : { "type" : "object", "deprecated" : false, "description" : "Type of the transaction.\n", "example" : "payment", "properties" : { "is" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the amount from the customer’s payment_source.\n* `payment` - The transaction represents capture of amount from the customer’s payment_source.\n* `refund` - The transaction represents a refund of amount to the customer’s payment_source.\n* `payment_reversal` - Indicates a reversal transaction.", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the amount from the customer’s payment_source.\n* `payment` - The transaction represents capture of amount from the customer’s payment_source.\n* `refund` - The transaction represents a refund of amount to the customer’s payment_source.\n* `payment_reversal` - Indicates a reversal transaction.", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "example" : null }, "in" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the amount from the customer’s payment_source.\n* `payment` - The transaction represents capture of amount from the customer’s payment_source.\n* `refund` - The transaction represents a refund of amount to the customer’s payment_source.\n* `payment_reversal` - Indicates a reversal transaction.", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "pattern" : "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the amount from the customer’s payment_source.\n* `payment` - The transaction represents capture of amount from the customer’s payment_source.\n* `refund` - The transaction represents a refund of amount to the customer’s payment_source.\n* `payment_reversal` - Indicates a reversal transaction.", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "pattern" : "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\]$", "example" : null } } }, "date" : { "type" : "object", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "amount" : { "type" : "object", "deprecated" : false, "description" : "Amount for this transaction.\n", "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_capturable" : { "type" : "object", "deprecated" : false, "description" : "To filter based on transaction's unused authorized/blocked amount.\n", "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "The status of this transaction.\n", "example" : "success", "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 \\* \\`late_failure\\` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "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 \\* \\`late_failure\\` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "in" : { "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 \\* \\`late_failure\\` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "pattern" : "^\\[(in_progress|success|voided|failure|timeout|needs_attention|late_failure)(,(in_progress|success|voided|failure|timeout|needs_attention|late_failure))*\\]$", "example" : null }, "not_in" : { "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 \\* \\`late_failure\\` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "pattern" : "^\\[(in_progress|success|voided|failure|timeout|needs_attention|late_failure)(,(in_progress|success|voided|failure|timeout|needs_attention|late_failure))*\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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/ramps" : { "post" : { "summary" : "Export Subscription Ramps", "description" : "Starts an export job for [subscription ramps](/docs/api/ramps) data. The exported zip file contains CSV files with ramp-related data. \n\n### Best practice\n\nFor a full data export, use filters to export in batches, as suggested in the samples below.\n", "operationId" : "export_subscription_ramps", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "export_type" : { "type" : "string", "default" : "data", "deprecated" : false, "description" : "

Determines the format of the data. Returns the export type based on the selected value.

\n* data -

Provides the full set of data for the subscription ramps in multiple .csv files.

\n* import_friendly_data -

Provides a .csv file whose columns match the ramp schema. This file format can be readily imported through the UI by using Bulk Operations.

", "enum" : [ "data", "import_friendly_data" ], "example" : null }, "ramp" : { "type" : "object", "deprecated" : false, "description" : "Parameters for ramp\n", "properties" : { "status" : { "type" : "object", "deprecated" : false, "description" : "

The execution status of the ramp. Use this filter to export ramps in a specific status, such as scheduled\n, succeeded\n, failed\n, or draft.

", "example" : "SCHEDULED", "properties" : { "in" : { "type" : "string", "description" : "\\* \\`scheduled\\` - Status of the subscription schedule on creation. \\* \\`succeeded\\` - The execution status of the schedule if success. \\* \\`failed\\` - The execution status of the schedule if failed. \\* \\`draft\\` - Status of the subscription schedule considering as draft\n", "enum" : [ "scheduled", "succeeded", "failed", "draft" ], "pattern" : "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\]$", "example" : null }, "is" : { "type" : "string", "description" : "\\* \\`scheduled\\` - Status of the subscription schedule on creation. \\* \\`succeeded\\` - The execution status of the schedule if success. \\* \\`failed\\` - The execution status of the schedule if failed. \\* \\`draft\\` - Status of the subscription schedule considering as draft\n", "enum" : [ "scheduled", "succeeded", "failed", "draft" ], "example" : null } } }, "subscription_id" : { "type" : "object", "deprecated" : false, "description" : "The ID of the subscription for which the ramp was created. Use this filter to export ramps that belong to specific subscriptions.\n", "example" : "8gsnbYfsMLds", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } }, "effective_from" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on effective_from\n, the time when the changes defined in the ramp are applied to the subscription by executing the ramp.

", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response. Learn more about the best practice before performing full export.

", "example" : "1435052328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "ramp" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_differential_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "item_id" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "day-pass", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "differential_price" : { "type" : "object", "deprecated" : false, "description" : "Parameters for differential_price\n", "properties" : { "item_price_id" : { "type" : "object", "deprecated" : false, "description" : "

The id of the item price (addon\nor charge\n) whose price should change according to the plan-item it is applied to.

", "example" : "day-pass-USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "id" : { "type" : "object", "deprecated" : false, "description" : "A unique and immutable id for the differential price. It is auto-generated when the differential price is created.\n", "example" : "defcc4f1-f21f-47f4-8019-beddb9beab5f", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "parent_item_id" : { "type" : "object", "deprecated" : false, "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\\](/docs/api/differential_prices) .\n", "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "differential_price" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_item_families", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "business_entity_id" : { "type" : "object", "deprecated" : false, "description" : "

optional, string filter

\n

The unique ID of the\nbusiness entity\nof this item_family.\nLearn more\nabout all the scenarios before using this filter.

\n\n

Supported operators :\nis, is_present

\n

Example →\nbusiness_entity_id[is_present] = "true"

", "example" : "business_entity_id", "properties" : { "is_present" : { "type" : "string", "format" : "boolean", "description" : "null\n", "enum" : [ "true", "false" ], "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } }, "include_site_level_resources" : { "type" : "object", "deprecated" : false, "description" : "

optional, boolean filter

\n

Default value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\ninclude_site_level_resources[is] = "null"

", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null }, "item_family" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_family\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "The identifier for the item family. It is unique and immutable.\n", "example" : "family-id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "name" : { "type" : "object", "deprecated" : false, "description" : "A unique display name for the item family. This is visible only in Chargebee and not to customers.\n", "example" : "family-name", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "When the item family was last updated.\n", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "item_family" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\n### Invoice Export Best Practice\n\nFor a full export, Chargebee recommends exporting data in batches by using date filters. The table below provides examples of how to set the filters: \n\n| **Scenario** | **Filter Example** | **Description** |\n|-----------------------------------------------|------------------------------------------------------------------|-----------------------------------------------|\n| Export invoices updated after January 1, 2024 | *invoice\\[updated_at\\]\\[after\\] = \"1704067200\"* | Export invoices from January 1, 2024 onwards. |\n| Export invoices for 2023 | *invoice\\[updated_at\\]\\[between\\] = \"\\[1672531200,1704067199\\]\"* | Export all invoices for the year 2023. |\n| Export invoices for 2022 | *invoice\\[updated_at\\]\\[between\\] = \"\\[1640995200,1672531199\\]\"* | Export all invoices for the year 2022. |\n\nIf the export still fails, further reduce the date range, for example: \n\n| **Scenario** | **Filter Example** | **Description** |\n|------------------------------------|------------------------------------------------------------------|----------------------------------------------------------------------|\n| Export for the second half of 2024 | *invoice\\[updated_at\\]\\[after\\] = \"1717200000\"* | Export invoices are updated after June 1, 2024. |\n| Export for the first half of 2024 | *invoice\\[updated_at\\]\\[between\\] = \"\\[1704067200,1717199999\\]\"* | Export invoices updated between January 1, 2024, and May 31, 2024. |\n| Export for the second half of 2023 | *invoice\\[updated_at\\]\\[between\\] = \"\\[1685577600,1704067199\\]\"* | Export invoices updated between June 1, 2023, and December 31, 2023. |\n| Export for the first half of 2023 | *invoice\\[updated_at\\]\\[between\\] = \"\\[1672531200,1685577599\\]\"* | Export invoices updated between January 1, 2023, and May 31, 2023. |\n\n**Note**\n\nThe date ranges in the examples above are just suggestions; you can adjust the date window to fit your specific needs. If an export fails due to large data volume, reduce the date window further and retry the export.\n", "operationId" : "export_invoices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_owner" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "payment_customer", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "invoice" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "The invoice number. Acts as a identifier for invoice and typically generated sequentially.\n", "example" : "INVOICE_654", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "subscription_id" : { "type" : "object", "deprecated" : false, "description" : "To filter based on subscription_id. NOTE: Not to be used if \\*consolidated invoicing\\* is enabled.\n", "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "The identifier of the customer this invoice belongs to.\n", "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "recurring" : { "type" : "object", "deprecated" : false, "description" : "Boolean indicating whether this invoice belongs to a subscription\n", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "Current status of this invoice.\n", "example" : "paid", "properties" : { "is" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null } } }, "price_type" : { "type" : "object", "deprecated" : false, "description" : "The price type of the invoice.\n", "example" : "tax_exclusive", "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } }, "date" : { "type" : "object", "deprecated" : false, "description" : "The document date displayed on the invoice PDF.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "paid_at" : { "type" : "object", "deprecated" : false, "description" : "Timestamp indicating the date \\\\\\& time this invoice got paid.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "total" : { "type" : "object", "deprecated" : false, "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.\n", "example" : "1000", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_paid" : { "type" : "object", "deprecated" : false, "description" : "

Payments collected successfully for the invoice. This is the sum of linked_payments[].txn_amount\nfor all linked_payments[]\nthat have txn_status\nas success.

", "example" : "800", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_adjusted" : { "type" : "object", "deprecated" : false, "description" : "Total adjustments made against this invoice.\n", "example" : "100", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "credits_applied" : { "type" : "object", "deprecated" : false, "description" : "Total credits applied against this invoice.\n", "example" : "100", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_due" : { "type" : "object", "deprecated" : false, "description" : "

The unpaid amount that is due on the invoice. This is calculated as: total

\n", "example" : "200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "dunning_status" : { "type" : "object", "deprecated" : false, "description" : "Current dunning status of the invoice.\n", "example" : "in_progress", "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "in" : { "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response. Learn more about the best practice before performing full export.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "invoice" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n\n**Note:** In case the export is in Failed or In-process state, then the downloads resource will not be available.\n", "operationId" : "retrieve_an_export", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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})):){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "export-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/export-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_price_variants", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "business_entity_id" : { "type" : "object", "deprecated" : false, "description" : "

optional, string filter

\n

The unique ID of the\nbusiness entity\nof this price_variant.\nLearn more\nabout all the scenarios before using this filter.

\n\n

Supported operators :\nis, is_present

\n

Example →\nbusiness_entity_id[is_present] = "true"

", "example" : "business_entity_id", "properties" : { "is_present" : { "type" : "string", "format" : "boolean", "description" : "null\n", "enum" : [ "true", "false" ], "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } }, "include_site_level_resources" : { "type" : "object", "deprecated" : false, "description" : "

optional, boolean filter

\n

Default value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\ninclude_site_level_resources[is] = "null"

", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null }, "price_variant" : { "type" : "object", "deprecated" : false, "description" : "Parameters for price_variant\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Filter variant based on their \\[id\\](/docs/api/exports) .\n", "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "name" : { "type" : "object", "deprecated" : false, "description" : "

Filter variant based on their name\ns.

", "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "

Filter variant based on their status\n.

", "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`active\\` - Active \\* \\`archived\\` - Archived\n", "enum" : [ "active", "archived" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`active\\` - Active \\* \\`archived\\` - Archived\n", "enum" : [ "active", "archived" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`active\\` - Active \\* \\`archived\\` - Archived\n", "enum" : [ "active", "archived" ], "pattern" : "^\\[(active|archived)(,(active|archived))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`active\\` - Active \\* \\`archived\\` - Archived\n", "enum" : [ "active", "archived" ], "pattern" : "^\\[(active|archived)(,(active|archived))*\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

Filter product based on their updated time\n.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "created_at" : { "type" : "object", "deprecated" : false, "description" : "

Filter product based on their created time\n.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "price_variant" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "business_entity_id" : { "type" : "object", "deprecated" : false, "description" : "

optional, string filter

\n

The unique ID of the\nbusiness entity\nof this item.\nLearn more\nabout all the scenarios before using this filter.

\n\n

Supported operators :\nis, is_present

\n

Example →\nbusiness_entity_id[is_present] = "true"

", "example" : "business_entity_id", "properties" : { "is_present" : { "type" : "string", "format" : "boolean", "description" : "null\n", "enum" : [ "true", "false" ], "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } }, "include_site_level_resources" : { "type" : "object", "deprecated" : false, "description" : "

optional, boolean filter

\n

Default value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\ninclude_site_level_resources[is] = "null"

", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null }, "item" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Filter items based on item id.\n", "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "item_family_id" : { "type" : "object", "deprecated" : false, "description" : "

Filter items based on item_family_id\n.

", "example" : "acme", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "type" : { "type" : "object", "deprecated" : false, "description" : "

Filter items based on item type\n.

", "example" : "plan", "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null } } }, "name" : { "type" : "object", "deprecated" : false, "description" : "

Filter items based on item name\n.

", "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "item_applicability" : { "type" : "object", "deprecated" : false, "description" : "

Filter items based on item_applicability\n.

", "example" : "all", "properties" : { "is" : { "type" : "string", "description" : "* `all` - all addon-items and charge-items are applicable to this plan-item.\n* `restricted` - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.", "enum" : [ "all", "restricted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `all` - all addon-items and charge-items are applicable to this plan-item.\n* `restricted` - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.", "enum" : [ "all", "restricted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `all` - all addon-items and charge-items are applicable to this plan-item.\n* `restricted` - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.", "enum" : [ "all", "restricted" ], "pattern" : "^\\[(all|restricted)(,(all|restricted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `all` - all addon-items and charge-items are applicable to this plan-item.\n* `restricted` - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.", "enum" : [ "all", "restricted" ], "pattern" : "^\\[(all|restricted)(,(all|restricted))*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "

Filter items based on item status\n.

", "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - The item can be used to create new item prices.\n* `archived` - The item is no longer active and no new item prices can be created\n* `deleted` - Indicates that the item has been deleted. The id and name can be reused. Deleted items can be retrieved using List items.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - The item can be used to create new item prices.\n* `archived` - The item is no longer active and no new item prices can be created\n* `deleted` - Indicates that the item has been deleted. The id and name can be reused. Deleted items can be retrieved using List items.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - The item can be used to create new item prices.\n* `archived` - The item is no longer active and no new item prices can be created\n* `deleted` - Indicates that the item has been deleted. The id and name can be reused. Deleted items can be retrieved using List items.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - The item can be used to create new item prices.\n* `archived` - The item is no longer active and no new item prices can be created\n* `deleted` - Indicates that the item has been deleted. The id and name can be reused. Deleted items can be retrieved using List items.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null } } }, "is_giftable" : { "type" : "object", "deprecated" : false, "description" : "Specifies if gift subscriptions can be created for this item.\n", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "Filter items based on when the items were last updated.\n", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "enabled_for_checkout" : { "type" : "object", "deprecated" : false, "description" : "Allow the plan to subscribed to via Checkout. Applies only for plan-items. \\*\\*Note:\\*\\* Only the in-app layout of Checkout is supported.\n", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null }, "enabled_in_portal" : { "type" : "object", "deprecated" : 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) .\n", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null }, "metered" : { "type" : "object", "deprecated" : false, "description" : "

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.

", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "usage_calculation" : { "type" : "object", "deprecated" : false, "description" : "

How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered.\nThis value overrides the one set at the site level\n.

", "example" : "SUM_OF_USAGES", "properties" : { "is" : { "type" : "string", "description" : "* `sum_of_usages` - the net quantity is the sum of the quantity of all usages for the current term.\n* `last_usage` - from among the usage records for the item price 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.\n* `max_usage` - from among the usage records for the item price 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" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `sum_of_usages` - the net quantity is the sum of the quantity of all usages for the current term.\n* `last_usage` - from among the usage records for the item price 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.\n* `max_usage` - from among the usage records for the item price 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" ], "example" : null }, "in" : { "type" : "string", "description" : "* `sum_of_usages` - the net quantity is the sum of the quantity of all usages for the current term.\n* `last_usage` - from among the usage records for the item price 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.\n* `max_usage` - from among the usage records for the item price 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" ], "pattern" : "^\\[(sum_of_usages|last_usage|max_usage)(,(sum_of_usages|last_usage|max_usage))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `sum_of_usages` - the net quantity is the sum of the quantity of all usages for the current term.\n* `last_usage` - from among the usage records for the item price 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.\n* `max_usage` - from among the usage records for the item price 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" ], "pattern" : "^\\[(sum_of_usages|last_usage|max_usage)(,(sum_of_usages|last_usage|max_usage))*\\]$", "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "item" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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:**\nThis report is deprecated. Therefore, the endpoint is also deprecated.\n\nThis API triggers export for the Deferred Revenue Report.\n\n**Note:**\nThis API call is asynchronous.\nYou need to check if this operation has completed by checking if the export status is **completed**\n. 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**\nfunction provided as an instance method in the library.\nYou 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.\n", "operationId" : "export_deferred_revenue_reports", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[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]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "report_by" : { "type" : "string", "deprecated" : false, "description" : "Determines the scope of the report. Returns the report based on the value specified.\n\\* subscription -\n\nSubscription\n\\* invoice -\n\nInvoice\n\\* product -\n\nProduct (Includes Plan, Addon and Adhoc)\n\\* customer -\n\nCustomer\n", "enum" : [ "customer", "invoice", "product", "subscription" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 3, "example" : null }, "report_from_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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.\n", "example" : null }, "report_from_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Obtains report data from the specified year, combined with the value specified for report_from_month.\n", "example" : null }, "report_to_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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.\n", "example" : null }, "report_to_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Obtains report data until the specified year, combined with the value specified for report_to_month.\n", "example" : null }, "include_discounts" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Returns amount with discount in the report. If value specified is false, it returns amount without discount.\n", "example" : null }, "payment_owner" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "payment_customer", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "item_id" : { "type" : "object", "deprecated" : false, "description" : "optional, string filter The plan item code. \\*\\*Supported operators :\\*\\* is, is_not, starts_with, in, not_in \\*\\*Example →\\*\\* \\*item_id\\\\\\[is\\\\\\] = \"silver\"\\*\n", "example" : "silver", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "item_price_id" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "silver-USD-monthly", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "cancel_reason_code" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "Not Paid", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "business_entity_id" : { "type" : "object", "deprecated" : false, "description" : "optional, string filter The unique ID of the \\[business entity\\](/docs/api/getting-started) of this subscription. This is always the same as the \\[business entity\\](/docs/api/subscriptions/subscription-object#customer_id) of the customer. \\*\\*Supported operators :\\*\\* is, is_not, starts_with \\*\\*Example →\\*\\* \\*business_entity_id\\\\\\[is_not\\\\\\] = \"business_entity_id\"\\*\n", "example" : "business_entity_id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "invoice" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "The invoice number. Acts as a identifier for invoice and typically generated sequentially.\n", "example" : "INVOICE_654", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "recurring" : { "type" : "object", "deprecated" : false, "description" : "Boolean indicating whether this invoice belongs to a subscription\n", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "Current status of this invoice.\n", "example" : "paid", "properties" : { "is" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null } } }, "price_type" : { "type" : "object", "deprecated" : false, "description" : "The price type of the invoice.\n", "example" : "tax_exclusive", "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } }, "date" : { "type" : "object", "deprecated" : false, "description" : "The document date displayed on the invoice PDF.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "paid_at" : { "type" : "object", "deprecated" : false, "description" : "Timestamp indicating the date \\\\\\& time this invoice got paid.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "total" : { "type" : "object", "deprecated" : false, "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.\n", "example" : "1000", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_paid" : { "type" : "object", "deprecated" : false, "description" : "

Payments collected successfully for the invoice. This is the sum of linked_payments[].txn_amount\nfor all linked_payments[]\nthat have txn_status\nas success.

", "example" : "800", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_adjusted" : { "type" : "object", "deprecated" : false, "description" : "Total adjustments made against this invoice.\n", "example" : "100", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "credits_applied" : { "type" : "object", "deprecated" : false, "description" : "Total credits applied against this invoice.\n", "example" : "100", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_due" : { "type" : "object", "deprecated" : false, "description" : "

The unpaid amount that is due on the invoice. This is calculated as: total

\n", "example" : "200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "dunning_status" : { "type" : "object", "deprecated" : false, "description" : "Current dunning status of the invoice.\n", "example" : "in_progress", "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "in" : { "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "Identifier of the customer with whom this subscription is associated.\n", "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "Current state of the subscription\n", "example" : "active", "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "in" : { "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null } } }, "cancel_reason" : { "type" : "object", "deprecated" : false, "description" : "The reason for canceling the subscription. Set by Chargebee automatically.\n", "example" : "not_paid", "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "in" : { "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "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))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "remaining_billing_cycles" : { "type" : "object", "deprecated" : 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\\](/docs/api/contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle.\n", "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "created_at" : { "type" : "object", "deprecated" : false, "description" : "The time at which the subscription was created.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "activated_at" : { "type" : "object", "deprecated" : false, "description" : "

Time at which the subscription status\nlast changed to\nactive.\nFor example, this value is updated when an in_trial\nor\ncancelled\nsubscription activates.

", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "next_billing_at" : { "type" : "object", "deprecated" : false, "description" : "

The date/time at which the next billing for the subscription happens. This is usually right after current_term_end\nunless multiple subscription terms were invoiced in advance using the terms_to_charge\nparameter.

", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "cancelled_at" : { "type" : "object", "deprecated" : false, "description" : "Time at which subscription was cancelled or is set to be cancelled.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "has_scheduled_changes" : { "type" : "object", "deprecated" : false, "description" : "

If true\n, there are subscription changes scheduled on next renewal.

", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "offline_payment_method" : { "type" : "object", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n", "example" : "cash", "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\n", "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" ], "example" : null }, "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\n", "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" ], "example" : null }, "in" : { "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\n", "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" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "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" ], "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))*\\]$", "example" : null } } }, "auto_close_invoices" : { "type" : "object", "deprecated" : false, "description" : "

Set to false\nto override for this subscription, the site-level setting\nfor 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\n.

", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Identifier of the customer.\n", "example" : "9bsvnHgsvmsI", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "first_name" : { "type" : "object", "deprecated" : false, "description" : "First name of the customer\n", "example" : "John", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "last_name" : { "type" : "object", "deprecated" : false, "description" : "Last name of the customer\n", "example" : "Clint", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "email" : { "type" : "object", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "example" : "john@test.com", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "company" : { "type" : "object", "deprecated" : false, "description" : "Company name of the customer.\n", "example" : "Globex Corp", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "phone" : { "type" : "object", "deprecated" : false, "description" : "Phone number of the customer\n", "example" : "(541) 754-3010", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "auto_collection" : { "type" : "object", "deprecated" : false, "description" : "Whether payments needs to be collected automatically for this customer\n", "example" : "on", "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.\n", "enum" : [ "on", "off" ], "example" : null }, "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.\n", "enum" : [ "on", "off" ], "example" : null }, "in" : { "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.\n", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null } } }, "taxability" : { "type" : "object", "deprecated" : false, "description" : "Specifies if the customer is liable for tax\n", "example" : "taxable", "properties" : { "is" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null } } }, "created_at" : { "type" : "object", "deprecated" : false, "description" : "Timestamp indicating when this customer resource is created.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "offline_payment_method" : { "type" : "object", "deprecated" : false, "description" : "The preferred offline payment method for the customer.\n", "example" : "cash", "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\n", "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" ], "example" : null }, "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\n", "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" ], "example" : null }, "in" : { "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\n", "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" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "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" ], "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))*\\]$", "example" : null } } }, "auto_close_invoices" : { "type" : "object", "deprecated" : false, "description" : "Override for this customer, the \\[site-level setting\\](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#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/subscription-object#auto_close_invoices) which takes precedence.\n", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null }, "relationship" : { "type" : "object", "deprecated" : false, "description" : "Parameters for relationship\n", "properties" : { "parent_id" : { "type" : "object", "deprecated" : false, "description" : "Immediate parent with whom we will link our new customer(child)\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "payment_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to pay\n", "example" : "active1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "invoice_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to handle invoices\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } }, "required" : [ "report_by", "report_from_month", "report_from_year", "report_to_month", "report_to_year" ], "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "invoice" : { "style" : "deepObject", "explode" : true }, "relationship" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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:**\nThis report is deprecated. Therefore, the endpoint is also deprecated.\n\nThis API triggers export for the revenue recognition report.\n\n**Note:**\nThis API call is asynchronous.\nYou need to check if this operation has completed by checking if the export status is **completed**\n. 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**\nfunction provided as an instance method in the library.\nYou 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.\n", "operationId" : "export_revenue_recognition_reports", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "report_by" : { "type" : "string", "deprecated" : false, "description" : "Determines the scope of the report. Returns the report based on the value specified.\n\\* subscription -\n\nSubscription\n\\* invoice -\n\nInvoice\n\\* product -\n\nProduct (Includes Plan, Addon and Adhoc)\n\\* customer -\n\nCustomer\n", "enum" : [ "customer", "invoice", "product", "subscription" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "Value must be in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html)\nformat. Generates the report based on the value specified. If no currency_code value is specified, then consolidated report based on base currency is returned.\n", "maxLength" : 3, "example" : null }, "report_from_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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.\n", "example" : null }, "report_from_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Obtains report data from the specified year, combined with the value specified for report_from_month.\n", "example" : null }, "report_to_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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.\n", "example" : null }, "report_to_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Obtains report data until the specified year, combined with the value specified for report_to_month.\n", "example" : null }, "include_discounts" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Returns amount with discount in the report. If value specified is false, it returns amount without discount.\n", "example" : null }, "payment_owner" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "payment_customer", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "item_id" : { "type" : "object", "deprecated" : false, "description" : "optional, string filter The plan item code. \\*\\*Supported operators :\\*\\* is, is_not, starts_with, in, not_in \\*\\*Example →\\*\\* \\*item_id\\\\\\[is\\\\\\] = \"silver\"\\*\n", "example" : "silver", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "item_price_id" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "silver-USD-monthly", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "cancel_reason_code" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "Not Paid", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "business_entity_id" : { "type" : "object", "deprecated" : false, "description" : "optional, string filter The unique ID of the \\[business entity\\](/docs/api/getting-started) of this subscription. This is always the same as the \\[business entity\\](/docs/api/subscriptions/subscription-object#customer_id) of the customer. \\*\\*Supported operators :\\*\\* is, is_not, starts_with \\*\\*Example →\\*\\* \\*business_entity_id\\\\\\[is_not\\\\\\] = \"business_entity_id\"\\*\n", "example" : "business_entity_id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "invoice" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "The invoice number. Acts as a identifier for invoice and typically generated sequentially.\n", "example" : "INVOICE_654", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "recurring" : { "type" : "object", "deprecated" : false, "description" : "Boolean indicating whether this invoice belongs to a subscription\n", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "Current status of this invoice.\n", "example" : "paid", "properties" : { "is" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -
The invoice 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_invoicesattribute is set to true.
The invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.
", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null } } }, "price_type" : { "type" : "object", "deprecated" : false, "description" : "The price type of the invoice.\n", "example" : "tax_exclusive", "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } }, "date" : { "type" : "object", "deprecated" : false, "description" : "The document date displayed on the invoice PDF.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "paid_at" : { "type" : "object", "deprecated" : false, "description" : "Timestamp indicating the date \\\\\\& time this invoice got paid.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "total" : { "type" : "object", "deprecated" : false, "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.\n", "example" : "1000", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_paid" : { "type" : "object", "deprecated" : false, "description" : "

Payments collected successfully for the invoice. This is the sum of linked_payments[].txn_amount\nfor all linked_payments[]\nthat have txn_status\nas success.

", "example" : "800", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_adjusted" : { "type" : "object", "deprecated" : false, "description" : "Total adjustments made against this invoice.\n", "example" : "100", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "credits_applied" : { "type" : "object", "deprecated" : false, "description" : "Total credits applied against this invoice.\n", "example" : "100", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_due" : { "type" : "object", "deprecated" : false, "description" : "

The unpaid amount that is due on the invoice. This is calculated as: total

\n", "example" : "200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "dunning_status" : { "type" : "object", "deprecated" : false, "description" : "Current dunning status of the invoice.\n", "example" : "in_progress", "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "in" : { "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "Identifier of the customer with whom this subscription is associated.\n", "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "Current state of the subscription\n", "example" : "active", "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "in" : { "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null } } }, "cancel_reason" : { "type" : "object", "deprecated" : false, "description" : "The reason for canceling the subscription. Set by Chargebee automatically.\n", "example" : "not_paid", "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "in" : { "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "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))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "remaining_billing_cycles" : { "type" : "object", "deprecated" : 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\\](/docs/api/contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle.\n", "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "created_at" : { "type" : "object", "deprecated" : false, "description" : "The time at which the subscription was created.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "activated_at" : { "type" : "object", "deprecated" : false, "description" : "

Time at which the subscription status\nlast changed to\nactive.\nFor example, this value is updated when an in_trial\nor\ncancelled\nsubscription activates.

", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "next_billing_at" : { "type" : "object", "deprecated" : false, "description" : "

The date/time at which the next billing for the subscription happens. This is usually right after current_term_end\nunless multiple subscription terms were invoiced in advance using the terms_to_charge\nparameter.

", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "cancelled_at" : { "type" : "object", "deprecated" : false, "description" : "Time at which subscription was cancelled or is set to be cancelled.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "has_scheduled_changes" : { "type" : "object", "deprecated" : false, "description" : "

If true\n, there are subscription changes scheduled on next renewal.

", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "offline_payment_method" : { "type" : "object", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n", "example" : "cash", "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\n", "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" ], "example" : null }, "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\n", "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" ], "example" : null }, "in" : { "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\n", "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" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "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" ], "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))*\\]$", "example" : null } } }, "auto_close_invoices" : { "type" : "object", "deprecated" : false, "description" : "

Set to false\nto override for this subscription, the site-level setting\nfor 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\n.

", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Identifier of the customer.\n", "example" : "9bsvnHgsvmsI", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "first_name" : { "type" : "object", "deprecated" : false, "description" : "First name of the customer\n", "example" : "John", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "last_name" : { "type" : "object", "deprecated" : false, "description" : "Last name of the customer\n", "example" : "Clint", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "email" : { "type" : "object", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "example" : "john@test.com", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "company" : { "type" : "object", "deprecated" : false, "description" : "Company name of the customer.\n", "example" : "Globex Corp", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "phone" : { "type" : "object", "deprecated" : false, "description" : "Phone number of the customer\n", "example" : "(541) 754-3010", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "auto_collection" : { "type" : "object", "deprecated" : false, "description" : "Whether payments needs to be collected automatically for this customer\n", "example" : "on", "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.\n", "enum" : [ "on", "off" ], "example" : null }, "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.\n", "enum" : [ "on", "off" ], "example" : null }, "in" : { "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.\n", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null } } }, "taxability" : { "type" : "object", "deprecated" : false, "description" : "Specifies if the customer is liable for tax\n", "example" : "taxable", "properties" : { "is" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the site configuration. 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.\n* `exempt` - ", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null } } }, "created_at" : { "type" : "object", "deprecated" : false, "description" : "Timestamp indicating when this customer resource is created.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "offline_payment_method" : { "type" : "object", "deprecated" : false, "description" : "The preferred offline payment method for the customer.\n", "example" : "cash", "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\n", "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" ], "example" : null }, "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\n", "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" ], "example" : null }, "in" : { "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\n", "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" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "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" ], "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))*\\]$", "example" : null } } }, "auto_close_invoices" : { "type" : "object", "deprecated" : false, "description" : "Override for this customer, the \\[site-level setting\\](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#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/subscription-object#auto_close_invoices) which takes precedence.\n", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null }, "relationship" : { "type" : "object", "deprecated" : false, "description" : "Parameters for relationship\n", "properties" : { "parent_id" : { "type" : "object", "deprecated" : false, "description" : "Immediate parent with whom we will link our new customer(child)\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "payment_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to pay\n", "example" : "active1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "invoice_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to handle invoices\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } }, "required" : [ "report_by", "report_from_month", "report_from_year", "report_to_month", "report_to_year" ], "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "invoice" : { "style" : "deepObject", "explode" : true }, "relationship" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_credit_notes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Credit-note id.\n", "example" : "CN_123", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "The identifier of the customer this Credit Note belongs to.\n", "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "subscription_id" : { "type" : "object", "deprecated" : false, "description" : "To filter based on subscription_id. NOTE: Not to be used if \\*consolidated invoicing\\* feature is enabled.\n", "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "reference_invoice_id" : { "type" : "object", "deprecated" : false, "description" : "The identifier of the invoice against which this Credit Note is issued\n", "example" : "INVOICE_876", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "type" : { "type" : "object", "deprecated" : false, "description" : "The credit note type. \\[Learn more\\](/docs/api/credit_notes/credit-note-object) about credit note types.\n", "example" : "adjustment", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`adjustment\\` - Adjustment Credit Note \\* \\`refundable\\` - Refundable Credit Note \\* \\`store\\` - Store Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`adjustment\\` - Adjustment Credit Note \\* \\`refundable\\` - Refundable Credit Note \\* \\`store\\` - Store Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`adjustment\\` - Adjustment Credit Note \\* \\`refundable\\` - Refundable Credit Note \\* \\`store\\` - Store Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "pattern" : "^\\[(adjustment|refundable|store)(,(adjustment|refundable|store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`adjustment\\` - Adjustment Credit Note \\* \\`refundable\\` - Refundable Credit Note \\* \\`store\\` - Store Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "pattern" : "^\\[(adjustment|refundable|store)(,(adjustment|refundable|store))*\\]$", "example" : null } } }, "reason_code" : { "type" : "object", "deprecated" : false, "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-object#create_reason_code) parameter instead\\\\\\]\n", "example" : "waiver", "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\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "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\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "in" : { "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\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "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))*\\]$", "example" : null } } }, "create_reason_code" : { "type" : "object", "deprecated" : false, "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\n", "example" : "Other", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "The credit note status.\n", "example" : "adjusted", "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.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "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.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "in" : { "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.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "pattern" : "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "pattern" : "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\]$", "example" : null } } }, "date" : { "type" : "object", "deprecated" : false, "description" : "The date the Credit Note is issued.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "total" : { "type" : "object", "deprecated" : false, "description" : "Credit Note amount in cents.\n", "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "price_type" : { "type" : "object", "deprecated" : false, "description" : "The price type of the Credit Note.\n", "example" : "tax_exclusive", "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } }, "amount_allocated" : { "type" : "object", "deprecated" : false, "description" : "The amount allocated to the invoices.\n", "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_refunded" : { "type" : "object", "deprecated" : false, "description" : "The refunds issued from this Credit Note.\n", "example" : "130", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "amount_available" : { "type" : "object", "deprecated" : false, "description" : "The yet to be used credits of this Credit Note.\n", "example" : "1400", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "voided_at" : { "type" : "object", "deprecated" : false, "description" : "Timestamp indicating the date and time this Credit Note gets voided.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.\n", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_coupons", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "currency_code" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "applicable_item_price_ids" : { "type" : "object", "deprecated" : false, "description" : "optional, string filter List of itemPrice ids for which these coupons are applicable. \\*\\*Supported operators :\\*\\* in, is \\*\\*Example →\\*\\* \\*applicable_item_price_ids\\\\\\[in\\\\\\] = \"day-pass-USD\"\\*\n", "example" : "day-pass-USD", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } }, "coupon" : { "type" : "object", "deprecated" : false, "description" : "Parameters for coupon\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "

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

\n

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.

", "example" : "OFF2008", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "name" : { "type" : "object", "deprecated" : false, "description" : "

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

\n

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.

", "example" : "Offer 10", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "discount_type" : { "type" : "object", "deprecated" : false, "description" : "The type of deduction\n", "example" : "fixed_amount", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`fixed_amount\\` - The specified amount will be deducted. \\* \\`percentage\\` - The specified percentage will be deducted. \\* \\`offer_quantity\\` - The specified units will be offered without any deduction.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`fixed_amount\\` - The specified amount will be deducted. \\* \\`percentage\\` - The specified percentage will be deducted. \\* \\`offer_quantity\\` - The specified units will be offered without any deduction.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`fixed_amount\\` - The specified amount will be deducted. \\* \\`percentage\\` - The specified percentage will be deducted. \\* \\`offer_quantity\\` - The specified units will be offered without any deduction.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "pattern" : "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`fixed_amount\\` - The specified amount will be deducted. \\* \\`percentage\\` - The specified percentage will be deducted. \\* \\`offer_quantity\\` - The specified units will be offered without any deduction.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "pattern" : "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\]$", "example" : null } } }, "duration_type" : { "type" : "object", "deprecated" : false, "description" : "Specifies the time duration for which this coupon is attached to the subscription.\n", "example" : "forever", "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.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `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" ], "example" : null }, "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.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `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" ], "example" : null }, "in" : { "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.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `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" ], "pattern" : "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\]$", "example" : null }, "not_in" : { "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.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `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" ], "pattern" : "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "Status of the coupon.\n", "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n* `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n* `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n* `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "pattern" : "^\\[(active|expired|archived|deleted|future)(,(active|expired|archived|deleted|future))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions or valid_till date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n* `future` - The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "pattern" : "^\\[(active|expired|archived|deleted|future)(,(active|expired|archived|deleted|future))*\\]$", "example" : null } } }, "apply_on" : { "type" : "object", "deprecated" : false, "description" : "The amount on the invoice to which the coupon is applied.\n", "example" : "invoice_amount", "properties" : { "is" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice sub_total.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -
\n The coupon is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.\n
\n
\n The coupon is applied to the invoice.line_item.amount that corresponds to the plan or addon specified by plan_ids and addon_ids.\n
\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice sub_total.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -
\n The coupon is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.\n
\n
\n The coupon is applied to the invoice.line_item.amount that corresponds to the plan or addon specified by plan_ids and addon_ids.\n
\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "in" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice sub_total.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -
\n The coupon is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.\n
\n
\n The coupon is applied to the invoice.line_item.amount that corresponds to the plan or addon specified by plan_ids and addon_ids.\n
\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.", "enum" : [ "invoice_amount", "each_specified_item" ], "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))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice sub_total.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -
\n The coupon is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.\n
\n
\n The coupon is applied to the invoice.line_item.amount that corresponds to the plan or addon specified by plan_ids and addon_ids.\n
\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.", "enum" : [ "invoice_amount", "each_specified_item" ], "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))*\\]$", "example" : null } } }, "created_at" : { "type" : "object", "deprecated" : false, "description" : "Timestamp indicating when this coupon is created.\n", "example" : "145222875", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-11-09.\n", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "coupon" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_orders", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "total" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "1394532759", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "order" : { "type" : "object", "deprecated" : false, "description" : "Parameters for order\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Uniquely identifies the order. It is the api identifier for the order\n", "example" : "3", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "subscription_id" : { "type" : "object", "deprecated" : false, "description" : "To filter based on subscription_id.\n", "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "The customer for which the order is created\n", "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "The status of this order.\n", "example" : "paid", "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.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "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.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "in" : { "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.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "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))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "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))*\\]$", "example" : null } } }, "price_type" : { "type" : "object", "deprecated" : false, "description" : "The price type of the order\n", "example" : "tax_exclusive", "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } }, "order_date" : { "type" : "object", "deprecated" : false, "description" : "The date on which the order will start getting processed.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "shipping_date" : { "type" : "object", "deprecated" : false, "description" : "This is the date on which the order will be delivered to the customer.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "shipped_at" : { "type" : "object", "deprecated" : false, "description" : "The time at which the order was shipped.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "delivered_at" : { "type" : "object", "deprecated" : false, "description" : "The time at which the order was delivered\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "cancelled_at" : { "type" : "object", "deprecated" : false, "description" : "The time at which the order was cancelled.\n", "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "amount_paid" : { "type" : "object", "deprecated" : false, "description" : "Total amount paid for the order.\n", "example" : "1000", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "refundable_credits" : { "type" : "object", "deprecated" : false, "description" : "The total amount that can be issued as credits for this order.\n", "example" : "1000", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "refundable_credits_issued" : { "type" : "object", "deprecated" : false, "description" : "The total amount issued as credits on behalf of this order.\n", "example" : "1000", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "Filter based on the time at which order has been updated.\n", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "resent_status" : { "type" : "object", "deprecated" : false, "description" : "Resent order status.\n", "example" : "fully_resent", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`fully_resent\\` - Order is Fully resent \\* \\`partially_resent\\` - Order is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`fully_resent\\` - Order is Fully resent \\* \\`partially_resent\\` - Order is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`fully_resent\\` - Order is Fully resent \\* \\`partially_resent\\` - Order is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "pattern" : "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`fully_resent\\` - Order is Fully resent \\* \\`partially_resent\\` - Order is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "pattern" : "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\]$", "example" : null } } }, "is_resent" : { "type" : "object", "deprecated" : false, "description" : "Order is resent order or not.\n", "example" : "false", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "original_order_id" : { "type" : "object", "deprecated" : false, "description" : "If resent order what is the parent order id.\n", "example" : "1243545465", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "order" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_item_prices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-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){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "item_family_id" : { "type" : "object", "deprecated" : false, "description" : "

optional, string filter

\n

Filter item prices based on item_family_id\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nitem_family_id[is] = "Acme"

", "example" : "Acme", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "item_type" : { "type" : "object", "deprecated" : false, "description" : "

optional, enumerated string filter

\n

Filter item prices based on item_type.\nPossible values are : plan, addon, charge.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nitem_type[is_not] = "plan"

", "example" : "plan", "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null } } }, "currency_code" : { "type" : "object", "deprecated" : false, "description" : "

optional, string filter

\n

Filter item prices based on their currency_code\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\ncurrency_code[is] = "USD"

", "example" : "USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "business_entity_id" : { "type" : "object", "deprecated" : false, "description" : "

optional, string filter

\n

The unique ID of the\nbusiness entity\nof this item_price.\nLearn more\nabout all the scenarios before using this filter.

\n\n

Supported operators :\nis, is_present

\n

Example →\nbusiness_entity_id[is_present] = "true"

", "example" : "business_entity_id", "properties" : { "is_present" : { "type" : "string", "format" : "boolean", "description" : "null\n", "enum" : [ "true", "false" ], "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } }, "include_site_level_resources" : { "type" : "object", "deprecated" : false, "description" : "

optional, boolean filter

\n

Default value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\ninclude_site_level_resources[is] = "null"

", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null }, "item_price" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_price\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "Filter item prices based on their \\[id\\](/docs/api/exports) .\n", "example" : "basic_USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "name" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their name\ns.

", "example" : "basic USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "pricing_model" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their pricing_model\n.

", "example" : "flat_fee", "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.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "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.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "in" : { "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.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "pattern" : "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "pattern" : "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\]$", "example" : null } } }, "item_id" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their item_id\n.

", "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "price_variant_id" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their price_variant_id\n.

", "example" : "tamilNadu-India", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "trial_period" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their trial_period\n.

", "example" : "14", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "trial_period_unit" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their trial_period_unit\n.

", "example" : "day", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`day\\` - A period of 24 hours. \\* \\`month\\` - A period of 1 calendar month.\n", "enum" : [ "day", "month" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`day\\` - A period of 24 hours. \\* \\`month\\` - A period of 1 calendar month.\n", "enum" : [ "day", "month" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`day\\` - A period of 24 hours. \\* \\`month\\` - A period of 1 calendar month.\n", "enum" : [ "day", "month" ], "pattern" : "^\\[(day|month)(,(day|month))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`day\\` - A period of 24 hours. \\* \\`month\\` - A period of 1 calendar month.\n", "enum" : [ "day", "month" ], "pattern" : "^\\[(day|month)(,(day|month))*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their status\n.

", "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - The item price can be used in subscriptions.\n* `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.\n* `deleted` - Indicates that the item price has been deleted. The id and name can be reused.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - The item price can be used in subscriptions.\n* `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.\n* `deleted` - Indicates that the item price has been deleted. The id and name can be reused.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - The item price can be used in subscriptions.\n* `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.\n* `deleted` - Indicates that the item price has been deleted. The id and name can be reused.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - The item price can be used in subscriptions.\n* `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.\n* `deleted` - Indicates that the item price has been deleted. The id and name can be reused.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their updated_at\n.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "period_unit" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their period_unit\n.

", "example" : "month", "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.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "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.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "in" : { "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.\n", "enum" : [ "day", "week", "month", "year" ], "pattern" : "^\\[(day|week|month|year)(,(day|week|month|year))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "day", "week", "month", "year" ], "pattern" : "^\\[(day|week|month|year)(,(day|week|month|year))*\\]$", "example" : null } } }, "period" : { "type" : "object", "deprecated" : false, "description" : "

Filter item prices based on their period\n.

", "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "item_price" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "export_subscriptions", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]))\\.){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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "export_type" : { "type" : "string", "default" : "data", "deprecated" : false, "description" : "

Determines the format of the data. Returns the export type based on the selected value.

\n* data -

Provides the full set of data for the subscriptions in multiple .csv files.

\n* import_friendly_data -

Provides a .csv file whose columns match the subscription schema. This file format can be readily imported through the UI by using Bulk Operations.

", "enum" : [ "data", "import_friendly_data" ], "example" : null }, "item_id" : { "type" : "object", "deprecated" : false, "description" : "optional, string filter The plan item code. \\*\\*Supported operators :\\*\\* is, is_not, starts_with, in, not_in \\*\\*Example →\\*\\* \\*item_id\\\\\\[is\\\\\\] = \"silver\"\\*\n", "example" : "silver", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "item_price_id" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "silver-USD-monthly", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "cancel_reason_code" : { "type" : "object", "deprecated" : false, "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\"\\*\n", "example" : "Not Paid", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "object", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "Identifier of the customer with whom this subscription is associated.\n", "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } }, "status" : { "type" : "object", "deprecated" : false, "description" : "Current state of the subscription\n", "example" : "active", "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "in" : { "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null } } }, "cancel_reason" : { "type" : "object", "deprecated" : false, "description" : "The reason for canceling the subscription. Set by Chargebee automatically.\n", "example" : "not_paid", "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "in" : { "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "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))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "remaining_billing_cycles" : { "type" : "object", "deprecated" : 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\\](/docs/api/contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle.\n", "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "created_at" : { "type" : "object", "deprecated" : false, "description" : "The time at which the subscription was created.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "activated_at" : { "type" : "object", "deprecated" : false, "description" : "

Time at which the subscription status\nlast changed to\nactive.\nFor example, this value is updated when an in_trial\nor\ncancelled\nsubscription activates.

", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "next_billing_at" : { "type" : "object", "deprecated" : false, "description" : "

The date/time at which the next billing for the subscription happens. This is usually right after current_term_end\nunless multiple subscription terms were invoiced in advance using the terms_to_charge\nparameter.

", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "cancelled_at" : { "type" : "object", "deprecated" : false, "description" : "Time at which subscription was cancelled or is set to be cancelled.\n", "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "has_scheduled_changes" : { "type" : "object", "deprecated" : false, "description" : "

If true\n, there are subscription changes scheduled on next renewal.

", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "updated_at" : { "type" : "object", "deprecated" : false, "description" : "

To filter based on updated_at.\nThis 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\ninput parameter as updated_at\nfor a faster response.

", "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } }, "offline_payment_method" : { "type" : "object", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n", "example" : "cash", "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\n", "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" ], "example" : null }, "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\n", "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" ], "example" : null }, "in" : { "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\n", "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" ], "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))*\\]$", "example" : null }, "not_in" : { "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\n", "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" ], "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))*\\]$", "example" : null } } }, "auto_close_invoices" : { "type" : "object", "deprecated" : false, "description" : "

Set to false\nto override for this subscription, the site-level setting\nfor 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\n.

", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } }, "channel" : { "type" : "object", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n", "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } }, "decommissioned" : { "type" : "object", "deprecated" : false, "description" : "Specifies whether a cancelled subscription is decommissioned or not\n", "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "export" : { "$ref" : "#/components/schemas/Export", "description" : "

Resource object representing export

" } }, "required" : [ "export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 200, "example" : null } }, { "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.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date", "deprecated" : false, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "full_export" : { "$ref" : "#/components/schemas/FullExport", "description" : "

Resource object representing full_export

" } }, "required" : [ "full_export" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_payment_intent", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "payment-intent-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/payment-intent-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_intent" : { "$ref" : "#/components/schemas/PaymentIntent", "description" : "

Resource object representing payment_intent

" } }, "required" : [ "payment_intent" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_a_payment_intent", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "payment-intent-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/payment-intent-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount(in cents) to be authorized for 3DS flow.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the amount used in transaction.\n", "maxLength" : 3, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "payment_method_type" : { "type" : "string", "default" : "card", "deprecated" : false, "description" : "The payment method of this intent.\n\\* google_pay -\n\ngoogle_pay\n\\* pay_co -\n\nPayments made via PayCo\n\\* tamara -\n\nPayments made via Tamara.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* apple_pay -\n\napple_pay\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* ideal -\n\nideal\n\\* bancontact -\n\nbancontact\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* pay_to -\n\nPayTo\n\\* trustly -\n\nTrustly\n\\* venmo -\n\nVenmo\n\\* after_pay -\n\nPayments made via Afterpay\n\\* alipay -\n\nPayments made via Alipay.\n\\* dotpay -\n\ndotpay\n\\* giropay -\n\ngiropay\n\\* sofort -\n\nsofort\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* paypay -\n\nPayPay\n\\* gcash -\n\nPayments made via GCash.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* direct_debit -\n\ndirect_debit\n\\* dana -\n\nPayments made via Dana.\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* boleto -\n\nboleto\n\\* faster_payments -\n\nFaster Payments\n\\* pix -\n\nPix\n\\* qpay -\n\nPayments made via Qpay.\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* amazon_payments -\n\nAmazon Payments\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* card -\n\ncard\n\\* upi -\n\nupi\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* klarna -\n\nPayments made via Klarna.\n\\* pay_by_bank -\n\nPay By Bank\n\\* go_pay -\n\nPayments made via GoPay\n\\* swish -\n\nPayments made via Swish\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* twint -\n\nPayments made via Twint\n\\* payme -\n\nPayments made via PayMe\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* kbc_payment_button -\n\nKBC Payment Button\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "success_url" : { "type" : "string", "deprecated" : false, "description" : "

The URL the customer will be directed to once 3DS verification is successful. Applicable only when payment_method_type\nis ideal\n, sofort\n, dotpay\nor giropay\n.

", "maxLength" : 250, "example" : null }, "failure_url" : { "type" : "string", "deprecated" : false, "description" : "

The URL the customer will be directed to when 3DS verification fails. Applicable only when payment_method_type\nis ideal\n, sofort\n, dotpay\nor giropay\n.

", "maxLength" : 250, "example" : null }, "payment_method_options" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

Payment method-specific options for this PaymentIntent. Only card is supported; keys for other payment method types are ignored.

\n\n

If not specified, the existing preference is retained. To clear it, pass payment_method_options with no challenge_preference.

", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_intent" : { "$ref" : "#/components/schemas/PaymentIntent", "description" : "

Resource object representing payment_intent

" } }, "required" : [ "payment_intent" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.

Customer resource lookup and creation

When 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, the payment_intent is created without any customer association and will be available for any customer.

Multiple business entities

If multiple business entities are created for the site, the customer resource lookup and creation happen within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context, and if not found, the resource is created for the default business entity 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features) 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). \n**See also**\n[Customer resource lookup and creation.](/docs/api/payment_intents)\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the customer for whom the payment_intent will be created. If specified, the payment_intent will be used exclusively for that customer. If not specified, the payment_intent won't be associated with any customer and will be available for any customer.

\n

See also

Customer resource lookup and creation\n.

", "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount(in cents) to be authorized for 3DS flow.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the amount used in transaction.\n", "maxLength" : 3, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Reference for payment method at gateway. Only applicable when the PaymentIntent is created for cards stored in the gateway.\n", "maxLength" : 200, "example" : null }, "defer_payment_method_type" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

When set to true, the binding of the payment method type and related fields is deferred during intent creation. As a result, fields such as gateway_account_id, gateway, payment_method_type, and reference_id provided in this request will be ignored until the intent is updated with a selected payment method.

", "example" : null }, "payment_method_type" : { "type" : "string", "default" : "card", "deprecated" : false, "description" : "The payment method of this intent.\n\\* google_pay -\n\ngoogle_pay\n\\* pay_co -\n\nPayments made via PayCo\n\\* tamara -\n\nPayments made via Tamara.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* apple_pay -\n\napple_pay\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* ideal -\n\nideal\n\\* bancontact -\n\nbancontact\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* pay_to -\n\nPayTo\n\\* trustly -\n\nTrustly\n\\* venmo -\n\nVenmo\n\\* after_pay -\n\nPayments made via Afterpay\n\\* alipay -\n\nPayments made via Alipay.\n\\* dotpay -\n\ndotpay\n\\* giropay -\n\ngiropay\n\\* sofort -\n\nsofort\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* paypay -\n\nPayPay\n\\* gcash -\n\nPayments made via GCash.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* direct_debit -\n\ndirect_debit\n\\* dana -\n\nPayments made via Dana.\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* boleto -\n\nboleto\n\\* faster_payments -\n\nFaster Payments\n\\* pix -\n\nPix\n\\* qpay -\n\nPayments made via Qpay.\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* amazon_payments -\n\nAmazon Payments\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* card -\n\ncard\n\\* upi -\n\nupi\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* klarna -\n\nPayments made via Klarna.\n\\* pay_by_bank -\n\nPay By Bank\n\\* go_pay -\n\nPayments made via GoPay\n\\* swish -\n\nPayments made via Swish\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* twint -\n\nPayments made via Twint\n\\* payme -\n\nPayments made via PayMe\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* kbc_payment_button -\n\nKBC Payment Button\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "success_url" : { "type" : "string", "deprecated" : false, "description" : "

The URL the customer will be directed to once 3DS verification is successful. Applicable only when payment_method_type\nis ideal\n, sofort\n, dotpay\nor giropay\n.

", "maxLength" : 250, "example" : null }, "failure_url" : { "type" : "string", "deprecated" : false, "description" : "

The URL the customer will be directed to when 3DS verification fails. Applicable only when payment_method_type\nis ideal\n, sofort\n, dotpay\nor giropay\n.

", "maxLength" : 250, "example" : null }, "payment_method_options" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

Payment method-specific options for this PaymentIntent. Only card is supported; keys for other payment method types are ignored.

\n", "example" : null } }, "required" : [ "amount", "currency_code" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_intent" : { "$ref" : "#/components/schemas/PaymentIntent", "description" : "

Resource object representing payment_intent

" } }, "required" : [ "payment_intent" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 a custom field configuration", "description" : "Retrieves the configuration for the [custom field](/docs/api/advanced-features#custom-fields) that matches the specified entity type and API name.\n", "operationId" : "retrieve_the_meta_data", "parameters" : [ { "name" : "entity_type", "in" : "query", "description" : "Allowed entity types for custom fields.\n\\* customer -\n\nEntity that represents a customer.\n\\* invoice -\n\nEntity that represents an invoice.\n\\* addon_item -\n\nEntity that represents item of type addon.\n\\* plan -\n\nEntity that represents a subscription plan.\n\\* subscription -\n\nEntity that represents a subscription of a customer.\n\\* coupon -\n\nEntity that represents a discount coupon.\n\\* charge_price -\n\nEntity that represents charge price.\n\\* item_family -\n\nEntity that represents item family.\n\\* addon -\n\nEntity that represents an addon.\n\\* addon_price -\n\nEntity that represents addon price.\n\\* credit_note -\n\nEntity that represents a credit note.\n\\* charge_item -\n\nEntity that represents item of type charge.\n\\* plan_item -\n\nEntity that represents item of type plan.\n\\* quote -\n\nEntity that represents a quote.\n\\* plan_price -\n\nEntity that represents plan price.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "enum" : [ "customer", "subscription", "plan", "addon", "invoice", "credit_note", "item_family", "plan_item", "addon_item", "charge_item", "plan_price", "addon_price", "charge_price", "coupon", "quote" ], "example" : null } }, { "name" : "api_name", "in" : "query", "description" : "Custom field identifier.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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,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})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "custom_field_config" : { "$ref" : "#/components/schemas/CustomFieldConfig", "description" : "

Resource object representing custom_field_config.

" } }, "required" : [ "custom_field_config" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 configurations", "description" : "Lists the configurations for all [custom fields](/docs/api/advanced-features#custom-fields) defined for the specified entity type.\n", "operationId" : "list_custom_field_configs", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "entity_type", "in" : "query", "description" : "Allowed entity types for custom fields.\n\\* customer -\n\nEntity that represents a customer.\n\\* invoice -\n\nEntity that represents an invoice.\n\\* addon_item -\n\nEntity that represents item of type addon.\n\\* plan -\n\nEntity that represents a subscription plan.\n\\* subscription -\n\nEntity that represents a subscription of a customer.\n\\* coupon -\n\nEntity that represents a discount coupon.\n\\* charge_price -\n\nEntity that represents charge price.\n\\* item_family -\n\nEntity that represents item family.\n\\* addon -\n\nEntity that represents an addon.\n\\* addon_price -\n\nEntity that represents addon price.\n\\* credit_note -\n\nEntity that represents a credit note.\n\\* charge_item -\n\nEntity that represents item of type charge.\n\\* plan_item -\n\nEntity that represents item of type plan.\n\\* quote -\n\nEntity that represents a quote.\n\\* plan_price -\n\nEntity that represents plan price.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "enum" : [ "customer", "subscription", "plan", "addon", "invoice", "credit_note", "item_family", "plan_item", "addon_item", "charge_item", "plan_price", "addon_price", "charge_price", "coupon", "quote" ], "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "custom_field_config" : { "$ref" : "#/components/schemas/CustomFieldConfig", "description" : "Resource object representing custom_field_config" } }, "required" : [ "custom_field_config" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nas deleted\n. This is not allowed if there are active\nitems under the item family. Once deleted, the id\nand name\nof 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-family-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-family-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item_family" : { "$ref" : "#/components/schemas/ItemFamily", "description" : "

Resource object representing item_family

" } }, "required" : [ "item_family" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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**\nthe conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.\n", "operationId" : "list_item_families", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]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})):){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nThe identifier for the item family. It is unique and immutable.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"family-id\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "family-id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "optional, string filter\n\nA unique display name for the item family. This is visible only in Chargebee and not to customers.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*name\\[is_not\\] = \"family-name\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "family-name", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nWhen the item family was last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[before\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "business_entity_id", "in" : "query", "description" : "

optional, string filter

\n

The unique ID of the\nbusiness entity\nof this item_family.\nLearn more\nabout all the scenarios before using this filter.

\n\n

Supported operators :\nis, is_present

\n

Example →\nbusiness_entity_id[is_present] = "true"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "business_entity_id", "properties" : { "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "include_site_level_resources", "in" : "query", "description" : "

optional, boolean filter

\n

Default value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\ninclude_site_level_resources[is] = "null"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item_family" : { "$ref" : "#/components/schemas/ItemFamily", "description" : "Resource object representing item_family" } }, "required" : [ "item_family" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "create_an_item_family", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier for the item family. Must be unique and is immutable.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.\n", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the item family. This is visible only in Chargebee and not to customers.\n", "maxLength" : 500, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nfor this item_family.\nThis is applicable only when multiple business entities have been created for the site. When provided, the operation will read or write data associated with the specified business entity. If not provided, the resource will be created at the site level, and the business_entity_id\nwill not be included in the API response.

\n

Note\nAn alternative way of passing this parameter is by means of a custom HTTP header.

\n", "maxLength" : 50, "example" : null } }, "required" : [ "id", "name" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item_family" : { "$ref" : "#/components/schemas/ItemFamily", "description" : "

Resource object representing item_family

" } }, "required" : [ "item_family" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_an_item_family", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]))\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-family-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-family-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item_family" : { "$ref" : "#/components/schemas/ItemFamily", "description" : "

Resource object representing item_family

" } }, "required" : [ "item_family" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_an_item_family", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-family-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-family-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.\n", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the item family. This is visible only in Chargebee and not to customers.\n", "maxLength" : 500, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item_family" : { "$ref" : "#/components/schemas/ItemFamily", "description" : "

Resource object representing item_family

" } }, "required" : [ "item_family" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n.

", "operationId" : "retrieve_a_product", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product", "description" : "

Resource object representing product

" } }, "required" : [ "product" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nThe following table will help you to understand the status of the mapped [item](/docs/api/items/item-object#status) and [item_price](/docs/api/item_prices/item_price-object#status) after passing product [status](/docs/api/products/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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "A unique internal name for the product. This is only visible in Chargebee.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "The unique name that appears for each product to the end user.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the product.\n", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "default" : "active", "deprecated" : false, "description" : "Status of the product. Refer to the [table](/docs/api/products/update-a-product)\nfor more information.\n\\* active -\n\nThe active products are visible on the storefront, subscription, or checkout.\n\\* inactive -\n\nThe inactive products are not visible on the storefront, subscription, or checkout.\n", "enum" : [ "active", "inactive" ], "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null }, "shippable" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "

Whether a product is shippable or not. Pass the value as true\nif it is a shippable physical product, else pass the value as false\n.

", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product", "description" : "

Resource object representing product

" } }, "required" : [ "product" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n. Deletion of a product is not allowed if there are active\nor archived\nvariants under the product or if there are items mapped to the product. Once deleted, the name\nof 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product", "description" : "

Resource object representing product

" } }, "required" : [ "product" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "remove_options" : { "type" : "array", "deprecated" : false, "description" : "List of options that you want to remove from the product. You can provide option names.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "options" : { "type" : "object", "deprecated" : false, "description" : "

The list of options that you want to add when the options[name]\nare absent in a product, you can use this parameter to update the option values that already exist in a product.

", "properties" : { "name" : { "type" : "array", "description" : "Unique name of the option.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "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\"\\]).\n", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null }, "default_value" : { "type" : "array", "description" : "Set the default value of an option.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "name" ], "example" : null } }, "example" : null }, "encoding" : { "options" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product", "description" : "

Resource object representing product

" } }, "required" : [ "product" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nor inactive\n. Use include_deleted\nparameter to include deleted products with active\nand inactive\nproducts.

", "operationId" : "list_products", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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 '\\\\\\\\\\\\\\\\\\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: "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nFilter product based on their [id](/docs/api/products)\n.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"basic\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "

optional, string filter

\n

Filter product based on their name\ns.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nname[is] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter product based on their status.\nPossible values are : active, inactive.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nstatus[is] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`inactive\\` - inactive\n", "enum" : [ "active", "inactive" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`inactive\\` - inactive\n", "enum" : [ "active", "inactive" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`inactive\\` - inactive\n", "enum" : [ "active", "inactive" ], "pattern" : "^\\[(active|inactive)(,(active|inactive))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`inactive\\` - inactive\n", "enum" : [ "active", "inactive" ], "pattern" : "^\\[(active|inactive)(,(active|inactive))*\\]$", "example" : null } } } }, { "name" : "shippable", "in" : "query", "description" : "optional, boolean filter\n\nFilter product based on whether it is shippable or not. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*shippable\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "has_variant", "in" : "query", "description" : "optional, boolean filter\n\nFilter product based on whether it has variants or not. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*has_variant\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter product based on their created time\n.\nSupported operators :\nafter, before, on, between

\n

Example →\ncreated_at[after] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter product based on their updated time\n.\nSupported operators :\nafter, before, on, between

\n

Example →\nupdated_at[after] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\nname, id, created_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"name\"*\n\nThis will sort the result based on the 'name' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "name", "id", "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "name", "id", "created_at", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product", "description" : "Resource object representing product" } }, "required" : [ "product" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "create_a_product", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|(?: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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "A unique internal name for the product. This is only visible in Chargebee.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "The unique name that appears to the end user for each product.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "default" : "active", "deprecated" : false, "description" : "Status of the product.\n\\* active -\n\nThe active products are visible on the storefront, subscription, or checkout.\n\\* inactive -\n\nThe inactive products are not visible on the storefront, subscription, or checkout.\n", "enum" : [ "active", "inactive" ], "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "The immutable unique identifier of the product. If not passed, it will get autogenerated.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the product.\n", "maxLength" : 500, "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "shippable" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "

Whether a product is shippable or not. Pass the value as true\nif it is a shippable physical product, else pass the value as false\n.

", "example" : null } }, "required" : [ "external_name", "name", "status" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product", "description" : "

Resource object representing product

" } }, "required" : [ "product" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_product_variants", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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 '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*true\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\* '.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nFilter variant based on their [id](/docs/api/variants)\n.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is_not\\] = \"basic\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "

optional, string filter

\n

Filter variant based on their name\ns.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nname[is] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "sku", "in" : "query", "description" : "

optional, string filter

\n

Filter variant based on their sku\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nsku[is] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter variant based on their status.\nPossible values are : active, inactive.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nstatus[is] = "active"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`inactive\\` - inactive\n", "enum" : [ "active", "inactive" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`inactive\\` - inactive\n", "enum" : [ "active", "inactive" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`inactive\\` - inactive\n", "enum" : [ "active", "inactive" ], "pattern" : "^\\[(active|inactive)(,(active|inactive))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`inactive\\` - inactive\n", "enum" : [ "active", "inactive" ], "pattern" : "^\\[(active|inactive)(,(active|inactive))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter product based on their updated time\n.\nSupported operators :\nafter, before, on, between

\n

Example →\nupdated_at[before] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter product based on their created time\n.\nSupported operators :\nafter, before, on, between

\n

Example →\ncreated_at[before] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\nname, id, status, created_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"name\"*\n\nThis will sort the result based on the 'name' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "name", "id", "status", "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "name", "id", "status", "created_at", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "variant" : { "$ref" : "#/components/schemas/Variant", "description" : "Resource object representing variant" } }, "required" : [ "variant" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\nThe following table will help you to understand the state of the variant status after passing status value during variant creation.

Parameter ValueProduct StatusVariant Status
No value passedactiveactive
No value passedinactiveinactive
Value passed as activeactiveactive
Value passed as inactiveactiveinactive
Value passed as activeinactivenot allowed
Value passed as inactiveinactiveinactive
", "operationId" : "create_a_product_variant", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The immutable unique identifier of a product variant. If not passed, it will get autogenerated.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "This is a unique name that appears for each product variant to the end user.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "The unique name that appears for each product variant to the end user.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A detailed description of this product variant.\n", "maxLength" : 500, "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Status of the product variant. Refer to the [table](/docs/api/variants/create-a-product-variant)\nfor more information.\n\\* active -\n\nThe active product variants are visible on the storefront, subscription, or checkout.\n\\* inactive -\n\nThe inactive product variants are not visible on the storefront, subscription, or checkout.\n", "enum" : [ "active", "inactive" ], "example" : null }, "option_values" : { "type" : "object", "deprecated" : false, "description" : "List of product variants option values.\n", "properties" : { "name" : { "type" : "array", "description" : "Name of the option values.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

Pass values of the option_values

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "name", "value" ], "example" : null } }, "required" : [ "name" ], "example" : null }, "encoding" : { "option_values" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "variant" : { "$ref" : "#/components/schemas/Variant", "description" : "

Resource object representing variant

" } }, "required" : [ "variant" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n.

", "operationId" : "retrieve_a_product_variant", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-variant-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-variant-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "variant" : { "$ref" : "#/components/schemas/Variant", "description" : "

Resource object representing variant

" } }, "required" : [ "variant" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_a_product_variant", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-variant-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-variant-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "This is a unique name that appears for each product variant to the end user.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A detailed description of this product variant.\n", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Status of the product variant.\n\\* active -\n\nThe active product variants are visible on the storefront, subscription, or checkout.\n\\* inactive -\n\nThe inactive product variants are not visible on the storefront, subscription, or checkout.\n", "enum" : [ "active", "inactive" ], "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "The unique name that appears for each product variant to the end user.\n", "maxLength" : 100, "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "variant" : { "$ref" : "#/components/schemas/Variant", "description" : "

Resource object representing variant

" } }, "required" : [ "variant" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\n. Deletion of a product variant is not allowed if there are active\nor archived\nitem_price_id\nunder the variant. Once the variant is deleted, the id\nand name\nof 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-9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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "product-variant-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/product-variant-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "variant" : { "$ref" : "#/components/schemas/Variant", "description" : "

Resource object representing variant

" } }, "required" : [ "variant" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nthe conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.

\n

Use Cases

Filter by custom fields

Note: Custom field filters are turned off by default. To turn them on for your site, contact Chargebee Support.

You can filter the response by custom fields configured on items. After they're turned on for your site, the filter parameters are visible on this page when you're logged in. For the supported operators and limits, see Filtering by custom field values.

Items can be one of three types: plan, addon, or charge. Each type can have its own custom fields, so the filter parameter is scoped per item type rather than shared across items.

Use one of the following forms, where cf_CUSTOM_FIELD_NAME is the exact, case-sensitive API name of a custom field configured on the corresponding item type:

plan_item[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE\naddon_item[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE\ncharge_item[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE\n

For example, to filter plan items by the custom field cf_package_id, pass it as a query parameter:

curl https://{site}.chargebee.com/api/v2/items \\\n    -G -u {site_api_key}: \\\n    -d plan_item[cf_package_id][is]="pkg-basic"\n
", "operationId" : "list_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nFilter items based on item id.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"basic\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "item_family_id", "in" : "query", "description" : "

optional, string filter

\n

Filter items based on item_family_id\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nitem_family_id[is] = "acme"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "acme", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter items based on item type.\nPossible values are : plan, addon, charge.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\ntype[is] = "plan"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "plan", "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "

optional, string filter

\n

Filter items based on item name\n.\nSupported operators :\nis, is_not, starts_with

\n

Example →\nname[is_not] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "item_applicability", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter items based on item_applicability.\nPossible values are : all, restricted.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nitem_applicability[is_not] = "all"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "all", "properties" : { "is" : { "type" : "string", "description" : "* `all` - all addon-items and charge-items are applicable to this plan-item.\n* `restricted` - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.", "enum" : [ "all", "restricted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `all` - all addon-items and charge-items are applicable to this plan-item.\n* `restricted` - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.", "enum" : [ "all", "restricted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `all` - all addon-items and charge-items are applicable to this plan-item.\n* `restricted` - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.", "enum" : [ "all", "restricted" ], "pattern" : "^\\[(all|restricted)(,(all|restricted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `all` - all addon-items and charge-items are applicable to this plan-item.\n* `restricted` - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.", "enum" : [ "all", "restricted" ], "pattern" : "^\\[(all|restricted)(,(all|restricted))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter items based on item status.\nPossible values are : active, archived.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nstatus[is] = "active"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - The item can be used to create new item prices.\n* `archived` - The item is no longer active and no new item prices can be created\n* `deleted` - Indicates that the item has been deleted. The id and name can be reused. Deleted items can be retrieved using List items.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - The item can be used to create new item prices.\n* `archived` - The item is no longer active and no new item prices can be created\n* `deleted` - Indicates that the item has been deleted. The id and name can be reused. Deleted items can be retrieved using List items.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - The item can be used to create new item prices.\n* `archived` - The item is no longer active and no new item prices can be created\n* `deleted` - Indicates that the item has been deleted. The id and name can be reused. Deleted items can be retrieved using List items.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - The item can be used to create new item prices.\n* `archived` - The item is no longer active and no new item prices can be created\n* `deleted` - Indicates that the item has been deleted. The id and name can be reused. Deleted items can be retrieved using List items.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null } } } }, { "name" : "is_giftable", "in" : "query", "description" : "optional, boolean filter\n\nSpecifies if gift subscriptions can be created for this item. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*is_giftable\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nFilter items based on when the items were last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "enabled_for_checkout", "in" : "query", "description" : "optional, boolean filter\n\nAllow the plan to subscribed to via Checkout. Applies only for plan-items.\n**Note:**\nOnly the in-app layout of Checkout is supported. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*enabled_for_checkout\\[is\\] = \"null\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } }, { "name" : "enabled_in_portal", "in" : "query", "description" : "optional, boolean filter\n\nAllow 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).\nApplies 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).\nPossible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*enabled_in_portal\\[is\\] = \"null\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } }, { "name" : "metered", "in" : "query", "description" : "

optional, boolean filter

\n

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

\n

Supported operators :\nis

\n

Example →\nmetered[is] = "true"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "usage_calculation", "in" : "query", "description" : "

optional, enumerated string filter

\n

How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered.\nThis value overrides the one set at the site level.\nPossible values are : sum_of_usages, last_usage, max_usage.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nusage_calculation[is_not] = "SUM_OF_USAGES"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "SUM_OF_USAGES", "properties" : { "is" : { "type" : "string", "description" : "* `sum_of_usages` - the net quantity is the sum of the quantity of all usages for the current term.\n* `last_usage` - from among the usage records for the item price 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.\n* `max_usage` - from among the usage records for the item price 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" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `sum_of_usages` - the net quantity is the sum of the quantity of all usages for the current term.\n* `last_usage` - from among the usage records for the item price 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.\n* `max_usage` - from among the usage records for the item price 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" ], "example" : null }, "in" : { "type" : "string", "description" : "* `sum_of_usages` - the net quantity is the sum of the quantity of all usages for the current term.\n* `last_usage` - from among the usage records for the item price 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.\n* `max_usage` - from among the usage records for the item price 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" ], "pattern" : "^\\[(sum_of_usages|last_usage|max_usage)(,(sum_of_usages|last_usage|max_usage))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `sum_of_usages` - the net quantity is the sum of the quantity of all usages for the current term.\n* `last_usage` - from among the usage records for the item price 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.\n* `max_usage` - from among the usage records for the item price 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" ], "pattern" : "^\\[(sum_of_usages|last_usage|max_usage)(,(sum_of_usages|last_usage|max_usage))*\\]$", "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "business_entity_id", "in" : "query", "description" : "

optional, string filter

\n

The unique ID of the\nbusiness entity\nof this item.\nLearn more\nabout all the scenarios before using this filter.

\n\n

Supported operators :\nis, is_present

\n

Example →\nbusiness_entity_id[is_present] = "true"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "business_entity_id", "properties" : { "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "include_site_level_resources", "in" : "query", "description" : "

optional, boolean filter

\n

Default value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\ninclude_site_level_resources[is] = "null"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\nname, id, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"name\"*\n\nThis will sort the result based on the 'name' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "name", "id", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "name", "id", "updated_at" ], "example" : null } }, "example" : null } }, { "name" : "bundle_configuration", "in" : "query", "description" : "

Parameters of bundle_configuration

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "type" : { "type" : "object", "deprecated" : false, "description" : "Type of the bundle\n", "example" : "fixed", "properties" : { "is" : { "type" : "string", "description" : "* `fixed` - Fixed bundle_configurations.type appears when you create a bundle plan that cannot be updated during checkout or subscription creation.", "enum" : [ "fixed" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `fixed` - Fixed bundle_configurations.type appears when you create a bundle plan that cannot be updated during checkout or subscription creation.", "enum" : [ "fixed" ], "example" : null }, "in" : { "type" : "string", "description" : "* `fixed` - Fixed bundle_configurations.type appears when you create a bundle plan that cannot be updated during checkout or subscription creation.", "enum" : [ "fixed" ], "pattern" : "^\\[(fixed)(,(fixed))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `fixed` - Fixed bundle_configurations.type appears when you create a bundle plan that cannot be updated during checkout or subscription creation.", "enum" : [ "fixed" ], "pattern" : "^\\[(fixed)(,(fixed))*\\]$", "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item", "description" : "Resource object representing item" } }, "required" : [ "item" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "create_an_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier for the item. Must be unique and is immutable once set.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the item. Must be unique. This is visible only in Chargebee and not to customers.\n", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The type of the item.\n\\* plan -\n\nAn 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.\n\\* charge -\n\nA 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](/docs/api/v2/pcv-1/invoices/create-invoice-for-a-one-time-charge)\nwithout being applied to a subscription.\n\\* addon -\n\nA recurring component that can be added to a subscription in addition to its plan.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the item. This is visible only in Chargebee and not to customers.\n", "maxLength" : 2000, "example" : null }, "item_family_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the Item family\nthat the item belongs to. Is mandatory when Product Families\nhave been enabled.

", "maxLength" : 100, "example" : null }, "is_giftable" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies if gift subscriptions can be created for this item.\n", "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "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.\n", "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the item.\n", "maxLength" : 100, "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : true, "deprecated" : 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).\nApplies 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).\nOnly the in-app version of the Portal is supported for Product Catalog v2.\n", "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "

If enabled_for_checkout\n, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.

", "maxLength" : 500, "example" : null }, "enabled_for_checkout" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Allow the plan to subscribed to via Checkout. Applies only for plan-items.\n**Note:**\nOnly the in-app layout of Checkout is supported.\n", "example" : null }, "item_applicability" : { "type" : "string", "default" : "all", "deprecated" : false, "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\nor Update an attached item\nAPI.

\n* all -

all addon-items and charge-items are applicable to this plan-item.

\n* restricted -

only the addon-items or charge-items provided in applicable_items\ncan be applied to this plan-item.

", "enum" : [ "all", "restricted" ], "example" : null }, "applicable_items" : { "type" : "array", "deprecated" : false, "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](/docs/api/attached_items/create-an-attached-item)\nor [Update an attached item](/docs/api/attached_items/update-an-attached-item)\nAPI.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "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](/docs/api/hosted_pages)\n, [invoices](/docs/api/invoices)\nand [quotes](/docs/api/quotes).\nExamples follow:\n\n* \"user\" for a cloud-collaboration platform.\n* \"GB\" for a data service.\n* \"issue\" for a magazine.\n", "maxLength" : 30, "example" : null }, "gift_claim_redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The URL to redirect to once the gift has been claimed by the receiver.\n", "maxLength" : 500, "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge\nand 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\n.

", "example" : null }, "metered" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Specifies whether the item undergoes usage-based or metered billing. Usage Based Billing or Metered Billing must be enabled on your site to set metered to true.

\n

Usage Based Billing

\n

When Usage Based Billing is enabled, metered is applicable only for items of type addon. When true, the quantity is calculated from usage events. When false, you must provide the quantity when adding an item price that belongs to this item to a subscription (for example, when creating or updating the subscription).

\n

Metered Billing

\n

When Metered Billing is enabled, metered is applicable only for items of type plan or addon. When true, the quantity is calculated from usage records. When false, you must provide the quantity when adding an item price that belongs to this item to a subscription (for example, when creating or updating the subscription).

", "example" : null }, "usage_calculation" : { "type" : "string", "deprecated" : false, "description" : "

How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered.\nThis value overrides the one set at the site level.\n.

\n* sum_of_usages -

the net quantity is the sum of the quantity\nof all usages for the current term.

\n* last_usage -

from among the usage records for the item price\nwith usage_date\nwithin the relevant billing period, the quantity\nof the usage record with the most recent usage_date\nis taken as the net quantity consumed.

\n* max_usage -

from among the usage records for the item price\nwith usage_date\nwithin the relevant billing period, the quantity\nof the usage record with the maximum value is taken as the net quantity consumed.

", "enum" : [ "sum_of_usages", "last_usage", "max_usage" ], "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the pricing is percentage-based.\n", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata).\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nfor this item.\nThis is applicable only when multiple business entities have been created for the site. When provided, the operation will read or write data associated with the specified business entity. If not provided, the resource will be created at the site level, and the business_entity_id\nwill not be included in the API response.

\n

Note\nAn alternative way of passing this parameter is by means of a custom HTTP header.

\n", "maxLength" : 50, "example" : null }, "bundle_configuration" : { "type" : "object", "deprecated" : false, "description" : "

Parameters of bundle_configuration

", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "

Type of the bundle

\n* fixed -

Fixed bundle_configuration.type\nappears when you create a bundle plan\nthat cannot be updated during checkout or subscription creation.

", "enum" : [ "fixed" ], "example" : null } }, "example" : null }, "bundle_items_to_add" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for bundle_items_to_add

", "properties" : { "item_id" : { "type" : "array", "description" : "

item_id\nthat needs to be added to the bundle.\nNote:\nThis parameter is only applicable when the item_type\nis plan\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

item_type\nthat can be added to the bundle.

\n* charge -

A non-recurring component that can be added to a bundle plan.

\n* addon -

A recurring component that can be added to a bundle plan.

\n* plan -

An essential component of the bundle plan.\nNote:\nAt least one plan\nitem must be associated with the bundle.

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the item(plan, addon, and charge) associated with the bundle.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "price_allocation" : { "type" : "array", "description" : "Price allocation of the item(plan, addon, and charge) associated with the bundle.\n", "items" : { "type" : "number", "format" : "decimal", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "id", "item_family_id", "name", "type" ], "example" : null }, "encoding" : { "bundle_configuration" : { "style" : "deepObject", "explode" : true }, "bundle_items_to_add" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item", "description" : "

Resource object representing item

" } }, "required" : [ "item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nas deleted. This is not allowed if there are active\nor archived\nitem 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item", "description" : "

Resource object representing item

" } }, "required" : [ "item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_an_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item", "description" : "

Resource object representing item

" } }, "required" : [ "item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_an_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The display name for the item. Must be unique. This is visible only in Chargebee and not to customers.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "

Description of the item. This is visible only in Chargebee and not to customers.

\n

Note:

", "maxLength" : 2000, "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "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.\n", "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the item.\n", "maxLength" : 100, "example" : null }, "item_family_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the Item family\nthat the item belongs to. Is mandatory when Product Families\nhave been enabled.

", "maxLength" : 100, "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : true, "deprecated" : 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).\nApplies 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)\n.\n", "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "

If enabled_for_checkout\n, then the URL to be redirected to once the checkout is complete. This parameter is only meant for plan-items.

", "maxLength" : 500, "example" : null }, "enabled_for_checkout" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Allow the plan to subscribed to via Checkout. Applies only for plan-items.\n**Note:**\nOnly the in-app layout of Checkout is supported.\n", "example" : null }, "item_applicability" : { "type" : "string", "default" : "all", "deprecated" : false, "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\nor Update an attached item\nAPI.

\n* all -

all addon-items and charge-items are applicable to this plan-item.

\n* restricted -

only the addon-items or charge-items provided in applicable_items\ncan be applied to this plan-item.

", "enum" : [ "all", "restricted" ], "example" : null }, "applicable_items" : { "type" : "array", "deprecated" : false, "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](/docs/api/attached_items/create-an-attached-item)\nor [Update an attached item](/docs/api/attached_items/update-an-attached-item)\nAPI.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "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](/docs/api/hosted_pages)\n, [invoices](/docs/api/invoices)\nand [quotes](/docs/api/quotes).\nExamples follow:\n\n* \"user\" for a cloud-collaboration platform.\n* \"GB\" for a data service.\n* \"issue\" for a magazine.\n", "maxLength" : 30, "example" : null }, "gift_claim_redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The URL to redirect to once the gift has been claimed by the receiver.\n", "maxLength" : 500, "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the item. \\[Learn more\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge\nand 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\n.

", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The status of the item.\n\\* active -\n\nThe item can be used to create new item prices.\n\\* archived -\n\nThe item is no longer active and no new item prices can be created\n", "enum" : [ "active", "archived" ], "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the pricing is percentage-based.\n", "example" : null }, "bundle_configuration" : { "type" : "object", "deprecated" : false, "description" : "

Parameters of bundle_configuration

", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "

Type of the bundle

\n* fixed -

Fixed bundle_configuration.type\nshould be provided when you create a bundle plan that cannot be updated during checkout or subscription creation.

", "enum" : [ "fixed" ], "example" : null } }, "example" : null }, "bundle_items_to_add" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for bundle_items_to_add

", "properties" : { "item_id" : { "type" : "array", "description" : "

item_id\nthat needs to be added to the bundle.\nNote:\nThis parameter is only applicable when the item_type\nis plan\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

item_type\nthat can be added to the bundle.

\n* charge -

A non-recurring component that can be added to a bundle plan.

\n* addon -

A recurring component that can be added to a bundle plan.

\n* plan -

An essential component of the bundle plan.\nNote:\nAt least one plan item must be associated with the bundle.

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the item(plan, addon, and charge) associated with the bundle.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "price_allocation" : { "type" : "array", "description" : "Price allocation of the item(plan, addon, and charge) associated with the bundle.\n", "items" : { "type" : "number", "format" : "decimal", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null }, "bundle_items_to_update" : { "type" : "object", "deprecated" : false, "description" : "Parameters for bundle_items_to_update\n", "properties" : { "item_id" : { "type" : "array", "description" : "

item_id\nthat needs to be updated from the bundle plan. This attribute is only applicable when the item_type\nis plan\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

item_type\nthat you want to update from the bundle.

\n* charge -

A non-recurring component that can be added to a bundle plan.

\n* addon -

A recurring component that can be added to a bundle plan.

\n* plan -

An essential component of the bundle plan.\nNote:\nAt least one plan item must be associated with the bundle.

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the item(plan, addon, and charge) associated with the bundle.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "price_allocation" : { "type" : "array", "description" : "Price allocation of the item(plan, addon, and charge) associated with the bundle.\n", "items" : { "type" : "number", "format" : "decimal", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null }, "bundle_items_to_remove" : { "type" : "object", "deprecated" : false, "description" : "Parameters for bundle_items_to_remove\n", "properties" : { "item_id" : { "type" : "array", "description" : "

item_id\nthat needs to be removed from the bundle plan.\nNote:\nThis attribute is only applicable when the item_type\nis plan\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

item_type\nthat you want to remove from the bundle.

\n* charge -

A non-recurring component that can be added to a bundle plan.

\n* plan -

An essential component of the bundle plan.\nNote:\nAt least one plan item must be associated with the bundle.

\n* addon -

A recurring component that can be added to a bundle plan.

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "bundle_configuration" : { "style" : "deepObject", "explode" : true }, "bundle_items_to_add" : { "style" : "deepObject", "explode" : true }, "bundle_items_to_remove" : { "style" : "deepObject", "explode" : true }, "bundle_items_to_update" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item", "description" : "

Resource object representing item

" } }, "required" : [ "item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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. 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "price-variant-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/price-variant-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "price_variant" : { "$ref" : "#/components/schemas/PriceVariant", "description" : "

Resource object representing price_variant

" } }, "required" : [ "price_variant" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "list_price_variants", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nFilter variant based on their [id](/docs/api/price_variants)\n.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"basic\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "

optional, string filter

\n

Filter variant based on their name\ns.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nname[is] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter variant based on their status.\nPossible values are : active, archived.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nstatus[is] = "active"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`active\\` - Active \\* \\`archived\\` - Archived\n", "enum" : [ "active", "archived" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`active\\` - Active \\* \\`archived\\` - Archived\n", "enum" : [ "active", "archived" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`active\\` - Active \\* \\`archived\\` - Archived\n", "enum" : [ "active", "archived" ], "pattern" : "^\\[(active|archived)(,(active|archived))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`active\\` - Active \\* \\`archived\\` - Archived\n", "enum" : [ "active", "archived" ], "pattern" : "^\\[(active|archived)(,(active|archived))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter product based on their updated time\n.\nSupported operators :\nafter, before, on, between

\n

Example →\nupdated_at[on] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter product based on their created time\n.\nSupported operators :\nafter, before, on, between

\n

Example →\ncreated_at[before] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "business_entity_id", "in" : "query", "description" : "

optional, string filter

\n

The unique ID of the\nbusiness entity\nof this price_variant.\nLearn more\nabout all the scenarios before using this filter.

\n\n

Supported operators :\nis, is_present

\n

Example →\nbusiness_entity_id[is_present] = "true"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "business_entity_id", "properties" : { "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "include_site_level_resources", "in" : "query", "description" : "

optional, boolean filter

\n

Default value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\ninclude_site_level_resources[is] = "null"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\nname, id, status, created_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"name\"*\n\nThis will sort the result based on the 'name' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "name", "id", "status", "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "name", "id", "status", "created_at", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "price_variant" : { "$ref" : "#/components/schemas/PriceVariant", "description" : "Resource object representing price_variant" } }, "required" : [ "price_variant" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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](/docs/api/item_prices).\n", "operationId" : "create_a_price_variant", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique and immutable identifier of the price variant.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A unique name of the price variant.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the price variant.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the price variant.\n", "maxLength" : 500, "example" : null }, "variant_group" : { "type" : "string", "deprecated" : false, "description" : "

The variant_group\norganizes similar price_variants\nto optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing-\nfor effective grouping. The variant_group\nprovides greater flexibility and precision in your pricing models.

", "maxLength" : 100, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nfor this price_variant.\nThis is applicable only when multiple business entities have been created for the site. When provided, the operation will read or write data associated with the specified business entity. If not provided, the resource will be created at the site level, and the business_entity_id\nwill not be included in the API response.

\n

Note\nAn alternative way of passing this parameter is by means of a custom HTTP header.

\n", "maxLength" : 50, "example" : null }, "attributes" : { "type" : "object", "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.\n", "properties" : { "name" : { "type" : "array", "description" : "Attribute name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "Attribute value\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "name", "value" ], "example" : null } }, "required" : [ "id", "name" ], "example" : null }, "encoding" : { "attributes" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "price_variant" : { "$ref" : "#/components/schemas/PriceVariant", "description" : "

Resource object representing price_variant

" } }, "required" : [ "price_variant" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_a_price_variant", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "price-variant-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/price-variant-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "price_variant" : { "$ref" : "#/components/schemas/PriceVariant", "description" : "

Resource object representing price_variant

" } }, "required" : [ "price_variant" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_a_price_variant", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "price-variant-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/price-variant-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "A unique name of the price variant.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the price variant.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the price variant.\n", "maxLength" : 500, "example" : null }, "variant_group" : { "type" : "string", "deprecated" : false, "description" : "

The variant_group\norganizes similar price_variants\nto optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing-\nfor effective grouping. The variant_group\nprovides greater flexibility and precision in your pricing models.

", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Status of a price variant.

\n* active -

Active price variant. This price variant can be attached to item prices\n.

\n* archived -

Archived price variant. This price variant is no longer active\nand cannot be attached to new item prices.\nExisting item prices that already have this price variant attached will continue to remain as is.

", "enum" : [ "active", "archived" ], "example" : null }, "attributes" : { "type" : "object", "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.\n", "properties" : { "name" : { "type" : "array", "description" : "Attribute name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "Attribute value\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "name", "value" ], "example" : null } }, "example" : null }, "encoding" : { "attributes" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "price_variant" : { "$ref" : "#/components/schemas/PriceVariant", "description" : "

Resource object representing price_variant

" } }, "required" : [ "price_variant" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "retrieve_an_item_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice", "description" : "

Resource object representing item_price

" } }, "required" : [ "item_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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.\n", "operationId" : "update_an_item_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "

A unique display name for the item price in the Chargebee UI. If external_name\nis not provided, this is also used in customer-facing pages and documents such as invoices\nand hosted pages\n.

", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "

Description of the item price.

\n

Note:

", "maxLength" : 2000, "example" : null }, "proration_type" : { "type" : "string", "deprecated" : false, "description" : "

Note\nApplicable only for item prices with:

\n

Specifies how to manage charges or credits for the addon item price during a subscription update\nor estimating\na subscription update.

\n* full_term -

Charge the full price of the addon item price or give the full credit. Don't apply any proration.

\n* site_default -

Use the site-wide proration setting\n.

\n* partial_term -

Prorate the charges or credits for the rest of the current term.

", "enum" : [ "site_default", "partial_term", "full_term" ], "example" : null }, "price_variant_id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique identifier of a [price variant](/docs/api/price_variants).\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The status of the item price.\n\\* archived -\n\nThe 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.\n\\* active -\n\nThe item price can be used in subscriptions.\n", "enum" : [ "active", "archived" ], "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the item price used in customer-facing pages and documents. These include invoices\nand hosted pages.\nIf not provided, then name\nis used.

", "maxLength" : 100, "example" : null }, "usage_accumulation_reset_frequency" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the frequency at which the usage counter needs to be reset.

\n

Note:\nChanges to the usage_accumulation_reset_frequency\nparameter for item_price\nis not allowed if the item\nis already linked to a subscription.

\n

.

\n* never -

Accumulates usage without ever resetting it.

\n* subscription_billing_frequency -

Accumulates usage until the subscription's billing frequency ends.

", "enum" : [ "never", "subscription_billing_frequency" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The currency code (ISO 4217 format\n) for the item price. If subscriptions, invoices or differential prices\nexist for this item price, currency_code\ncannot be changed.

", "maxLength" : 3, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "is_taxable" : { "type" : "boolean", "default" : true, "deprecated" : false, "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)\nhave been disabled in Chargebee. However, the value is effective only while Taxes are enabled.\n", "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

Free quantity the subscriptions of this plan item_price will have. Only the quantity exceeding this value will be charged in the subscription.

\n

Note:

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "pricing_model" : { "type" : "string", "default" : "flat_fee", "deprecated" : false, "description" : "

The pricing scheme for this item price. If subscriptions, invoices or differential prices exist for this item price, pricing_model cannot be changed.

\n* tiered -

There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.

\n* per_unit -

A fixed price per unit quantity.

\n* flat_fee -

A fixed price that is not quantity-based.

\n* volume -

The per unit price is based on the tier that the total quantity falls in.

\n* 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" ], "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The cost of the item price when the pricing model is flat_fee.\nWhen the pricing model is per_unit\n, 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\n.

", "minimum" : 0, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The price of the item when the pricing_model is flat_fee.\nWhen the pricing model is per_unit\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nIf subscriptions or invoices exist for this item price, period_unit\ncannot be changed. The period_unit\nis mandatory when the item type\nis plan\nor addon\n.

\n

Important:\nThe period + period_unit pair must match a configured billing frequency on your site. The API does not create new frequencies. To use a new frequency (for example, 3 months or 2 weeks), add it in the site settings first. Requests with non-configured combinations fail validation.

\n* month -

A period of 1 calendar month.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "\n

If subscriptions or invoices exist for this item price, period\ncannot be changed. The period\nis mandatory when the item type\nis plan\nor addon.

\n

Important:\nThe period value, together with period_unit, must equal one of your site's configured billing frequencies. If the combination does not exist, the request fails with an invalid billing period configuration error. Configure the frequency in site settings and retry. See Addons and billing cycle.

", "minimum" : 1, "example" : null }, "trial_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for trial_period\n.

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "month" ], "example" : null }, "trial_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The trial period of the plan in trial_period_unit\ns. You can also set trial periods for addons\n; contact Support\nto enable that feature.

", "minimum" : 0, "example" : null }, "shipping_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Defines the shipping frequency. Example: to bill customer every 2 weeks, provide \"2\" here.\n", "minimum" : 1, "example" : null }, "shipping_period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines the shipping frequency in association with shipping period.\n\\* day -\n\nA period of 24 hours.\n\\* week -\n\nA period of 7 days.\n\\* year -\n\nA period of 1 calendar year.\n\\* month -\n\nA period of 1 calendar month.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The default number of billing cycles a subscription to the plan must run. Can be overridden for a subscription.\nAddons can also have billing cycles. Also, for addons, you can override this while attaching it to a plan. However, if you provide the value while applying the addon to a subscription, then that value takes still higher precedence.\nIf subscriptions, invoices or differential prices\nexist for this item price, billing_cycles\ncannot be changed.

\n

Note:\nIf you want to change the billing_cycles\nto unlimited renewals, enter an empty string. This value can only be updated if the item_price\nis not attached to a subscription or invoice. If no billing_cycles\nvalue is entered, then by default the value will be set as unlimited billing_cycles\nrenewals.

", "minimum" : 1, "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "

Applicable only when End-of-trial Action\nhas been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the item.type\nis plan\nand a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the subscription-level\n.

\n* cancel_subscription -

The subscription cancels.

\n* activate_subscription -

The subscription activates and charges are raised for non-metered items.

\n* site_default -

The action configured for the site\nat the time when the trial ends, takes effect.

", "enum" : [ "site_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "show_description_in_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "Whether the item price's description should be shown on [invoice PDFs](/docs/api/invoices/retrieve-invoice-as-pdf).\nIf 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)\n) after the change are affected; past invoices are not.\n", "example" : null }, "show_description_in_quotes" : { "type" : "boolean", "deprecated" : false, "description" : "Whether the item price's description should be shown on [quote PDFs](/docs/api/quotes/retrieve-quote-as-pdf).\nIf this Boolean is changed, only quotes created after the change are affected; past quotes are not.\n", "example" : null }, "tax_detail" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_detail\n", "properties" : { "tax_profile_id" : { "type" : "string", "deprecated" : false, "description" : "The tax profile of the item price.\n", "maxLength" : 50, "example" : null }, "avalara_tax_code" : { "type" : "string", "deprecated" : false, "description" : "The [Avalara tax codes](https://taxcode.avatax.avalara.com)\nfor the item price. Applicable only if you use [AvaTax for Sales integration](https://www.chargebee.com/docs/2.0/avatax-for-sales.html)\n.\n", "maxLength" : 50, "example" : null }, "hsn_code" : { "type" : "string", "deprecated" : false, "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "maxLength" : 50, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the [Avalara sale type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* retail -\n\nTransaction is a sale to an end user\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the [Avalara transaction type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the [Avalara service type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n", "example" : null }, "taxjar_product_code" : { "type" : "string", "deprecated" : false, "description" : "The [TaxJar product code](https://developers.taxjar.com/api/reference/#get-list-tax-categories)\nfor the item price. Applicable only if you use [TaxJar integration](https://www.chargebee.com/docs/2.0/taxjar.html)\n.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "accounting_detail" : { "type" : "object", "deprecated" : false, "description" : "Parameters for accounting_detail\n", "properties" : { "sku" : { "type" : "string", "deprecated" : false, "description" : "This maps to the sku or product name in the accounting integration.\n", "maxLength" : 100, "example" : null }, "accounting_code" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the chart of accounts under which the item price falls in the accounting system.\n", "maxLength" : 100, "example" : null }, "accounting_category1" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n\n", "maxLength" : 100, "example" : null }, "accounting_category2" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n\n", "maxLength" : 100, "example" : null }, "accounting_category3" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n", "maxLength" : 100, "example" : null }, "accounting_category4" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**NetSuite:**](https://www.chargebee.com/docs/2.0/netsuite.html ) Provide the \"Revenue Recognition Rule Id\" for the product from NetSuite.\n* [**Intacct:**](https://www.chargebee.com/docs/2.0/intacct.html ) If you have configured \"Revenue Recognition Templates\" for products in Intacct, provide the template ID for the product.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tiers\n", "properties" : { "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume\n; the total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency\n.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for the addon. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20, consuming 400 units will result in a charge of $80 (4 × $20).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "field_id", "field_value", "provider_name" ], "example" : null } }, "example" : null }, "encoding" : { "accounting_detail" : { "style" : "deepObject", "explode" : true }, "tax_detail" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true }, "tiers" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice", "description" : "

Resource object representing item_price

" } }, "required" : [ "item_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/delete" : { "post" : { "summary" : "Delete an item price", "description" : "

Deletes an item price, marking its status as deleted. If it is part of a subscription or invoice, the item price status is marked archived instead. Once deleted, the id and name of the item price can be reused to create a new item price.

", "operationId" : "delete_an_item_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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A-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice", "description" : "

Resource object representing item_price

" } }, "required" : [ "item_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_item_prices" : { "get" : { "summary" : "List applicable item prices for a plan-item price", "description" : "

Returns the set of all applicable addon-item\nprices for a specific plan-item price. This set consists of all the addon-item prices that can be applied to a subscription having the plan-item price. When determining this set, Chargebee considers the following:

Note

If an addon-item price has differential pricing defined against the parent item of the plan-item price, then the pricing information in the addon-item price object returned, reflects the differential pricing.

", "operationId" : "list_applicable_item_prices_for_a_plan-item_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0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):){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "item_id", "in" : "query", "description" : "The id of the item that the item price belongs to.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\nname, id, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"name\"*\n\nThis will sort the result based on the 'name' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "name", "id", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "name", "id", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice", "description" : "Resource object representing item_price" } }, "required" : [ "item_price" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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\nfor a specific plan-item price\n. 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\nand applicable_items\ndefined 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\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\nname, id, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"name\"*\n\nThis will sort the result based on the 'name' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "name", "id", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "name", "id", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item", "description" : "Resource object representing item" } }, "required" : [ "item" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : { "get" : { "summary" : "List item prices", "description" : "

Returns a list of item prices satisfying all the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order.

\n

Use Cases

Filter by custom fields

Note: Custom field filters are turned off by default. To turn them on for your site, contact Chargebee Support.

You can filter the response by custom fields configured on item prices. After they're turned on for your site, the filter parameters are visible on this page when you're logged in. For the supported operators and limits, see Filtering by custom field values.

Item prices inherit the type of their parent item (plan, addon, or charge), and each type can have its own custom fields. As a result, the filter parameter is scoped per item price type rather than shared across item prices.

Use one of the following forms, where cf_CUSTOM_FIELD_NAME is the exact, case-sensitive API name of a custom field configured on the corresponding item price type:

plan_price[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE\naddon_price[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE\ncharge_price[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE\n

For example, to filter plan item prices by the custom field cf_region, pass it as a query parameter:

curl https://{site}.chargebee.com/api/v2/item_prices \\\n    -G -u {site_api_key}: \\\n    -d plan_price[cf_region][is]="APAC"\n
", "operationId" : "list_item_prices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-f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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,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nFilter item prices based on their [id](/docs/api/item_prices)\n.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"basic_USD\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic_USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "

optional, string filter

\n

Filter item prices based on their name\ns.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nname[is] = "basic USD"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "pricing_model", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter item prices based on their pricing_model.\nPossible values are : flat_fee, per_unit, tiered, volume, stairstep.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\npricing_model[is] = "flat_fee"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "flat_fee", "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.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "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.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "in" : { "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.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "pattern" : "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "pattern" : "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\]$", "example" : null } } } }, { "name" : "item_id", "in" : "query", "description" : "

optional, string filter

\n

Filter item prices based on their item_id\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nitem_id[is] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "item_family_id", "in" : "query", "description" : "

optional, string filter

\n

Filter item prices based on item_family_id\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nitem_family_id[is] = "Acme"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Acme", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "item_type", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter item prices based on item_type.\nPossible values are : plan, addon, charge.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nitem_type[is_not] = "plan"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "plan", "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null } } } }, { "name" : "currency_code", "in" : "query", "description" : "

optional, string filter

\n

Filter item prices based on their currency_code\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\ncurrency_code[is_not] = "USD"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "price_variant_id", "in" : "query", "description" : "

optional, string filter

\n

Filter item prices based on their price_variant_id\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nprice_variant_id[is] = "tamilNadu-India"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "tamilNadu-India", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "trial_period", "in" : "query", "description" : "

optional, integer filter

\n

Filter item prices based on their trial_period\n.\nSupported operators :\nis, is_not, lt, lte, gt, gte, between

\n

Example →\ntrial_period[is] = "14"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "14", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "trial_period_unit", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter item prices based on their trial_period_unit.\nPossible values are : day, month.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\ntrial_period_unit[is] = "day"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "day", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`day\\` - A period of 24 hours. \\* \\`month\\` - A period of 1 calendar month.\n", "enum" : [ "day", "month" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`day\\` - A period of 24 hours. \\* \\`month\\` - A period of 1 calendar month.\n", "enum" : [ "day", "month" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`day\\` - A period of 24 hours. \\* \\`month\\` - A period of 1 calendar month.\n", "enum" : [ "day", "month" ], "pattern" : "^\\[(day|month)(,(day|month))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`day\\` - A period of 24 hours. \\* \\`month\\` - A period of 1 calendar month.\n", "enum" : [ "day", "month" ], "pattern" : "^\\[(day|month)(,(day|month))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter item prices based on their status.\nPossible values are : active, archived.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nstatus[is] = "active"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - The item price can be used in subscriptions.\n* `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.\n* `deleted` - Indicates that the item price has been deleted. The id and name can be reused.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - The item price can be used in subscriptions.\n* `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.\n* `deleted` - Indicates that the item price has been deleted. The id and name can be reused.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - The item price can be used in subscriptions.\n* `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.\n* `deleted` - Indicates that the item price has been deleted. The id and name can be reused.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - The item price can be used in subscriptions.\n* `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.\n* `deleted` - Indicates that the item price has been deleted. The id and name can be reused.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter item prices based on their updated_at\n.\nSupported operators :\nafter, before, on, between

\n

Example →\nupdated_at[after] = "1243545465"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "business_entity_id", "in" : "query", "description" : "

optional, string filter

\n

The unique ID of the\nbusiness entity\nof this item_price.\nLearn more\nabout all the scenarios before using this filter.

\n\n

Supported operators :\nis, is_present

\n

Example →\nbusiness_entity_id[is_present] = "true"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "business_entity_id", "properties" : { "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "include_site_level_resources", "in" : "query", "description" : "

optional, boolean filter

\n

Default value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false

\n

Supported operators :\nis

\n

Example →\ninclude_site_level_resources[is] = "null"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } }, { "name" : "period_unit", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter item prices based on their period_unit.\nPossible values are : day, week, month, year.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nperiod_unit[is] = "month"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "month", "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.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "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.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "in" : { "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.\n", "enum" : [ "day", "week", "month", "year" ], "pattern" : "^\\[(day|week|month|year)(,(day|week|month|year))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "day", "week", "month", "year" ], "pattern" : "^\\[(day|week|month|year)(,(day|week|month|year))*\\]$", "example" : null } } } }, { "name" : "period", "in" : "query", "description" : "

optional, integer filter

\n

Filter item prices based on their period\n.\nSupported operators :\nis, is_not, lt, lte, gt, gte, between

\n

Example →\nperiod[is] = "3"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "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. \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" ], "example" : null }, "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. \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" ], "example" : null }, "in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "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. \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" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\nname, id, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"name\"*\n\nThis will sort the result based on the 'name' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "name", "id", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "name", "id", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice", "description" : "Resource object representing item_price" } }, "required" : [ "item_price" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 price", "description" : "This API creates an item price (a price point) for an [item](/docs/api/items).\n", "operationId" : "create_an_item_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier for the item price. It is unique and immutable.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

A unique display name for the item price in the Chargebee UI. If external_name\nis not provided, this is also used in customer-facing pages and documents such as invoices\nand hosted pages\n.

", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the item price.\n", "maxLength" : 2000, "example" : null }, "item_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item that the item price belongs to.\n", "maxLength" : 100, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "proration_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies how to manage charges or credits for the addon item price during a [subscription update](/docs/api/subscriptions/update-subscription-for-items)\nor [estimating](/docs/api/estimates/estimate-for-updating-a-subscription)\na subscription update.\n\\* full_term -\n\nCharge the full price of the addon item price or give the full credit. Don't apply any proration.\n\\* site_default -\n\nUse the [site-wide proration setting](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change)\n.\n\\* partial_term -\n\nProrate the charges or credits for the rest of the current term.\n", "enum" : [ "site_default", "partial_term", "full_term" ], "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the item price used in customer-facing pages and documents. These include invoices\nand hosted pages.\nIf not provided, then name\nis used.

", "maxLength" : 100, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) for the item price. Is required when multiple currencies have been enabled.\n", "maxLength" : 3, "example" : null }, "price_variant_id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique identifier of a [price variant](/docs/api/price_variants).\n", "maxLength" : 100, "example" : null }, "is_taxable" : { "type" : "boolean", "default" : true, "deprecated" : false, "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)\nhave been disabled in Chargebee. However, the value is effective only while Taxes are enabled.\n", "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

Free quantity the subscriptions of this plan item_price will have. Only the quantity exceeding this value will be charged in the subscription.

\n

Note:

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "show_description_in_invoices" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the item price's description should be shown on [invoice PDFs](/docs/api/invoices/retrieve-invoice-as-pdf).\nIf 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)\n) after the change are affected; past invoices are not.\n", "example" : null }, "show_description_in_quotes" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the item price's description should be shown on [quote PDFs](/docs/api/quotes/retrieve-quote-as-pdf).\nIf this Boolean is changed, only quotes created after the change are affected; past quotes are not.\n", "example" : null }, "usage_accumulation_reset_frequency" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the frequency at which the usage counter needs to be reset.

\n

Note:\nChanges to the usage_accumulation_reset_frequency\nparameter for item_price\nis not allowed if the item\nis already linked to a subscription.

\n

.

\n* never -

Accumulates usage without ever resetting it.

\n* subscription_billing_frequency -

Accumulates usage until the subscription's billing frequency ends.

", "enum" : [ "never", "subscription_billing_frequency" ], "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nfor this item_price.\nThis is applicable only when multiple business entities have been created for the site. When provided, the operation will read or write data associated with the specified business entity. If not provided, the resource will be created at the site level, and the business_entity_id\nwill not be included in the API response.

\n

Note\nAn alternative way of passing this parameter is by means of a custom HTTP header.

\n", "maxLength" : 50, "example" : null }, "pricing_model" : { "type" : "string", "default" : "flat_fee", "deprecated" : false, "description" : "

The pricing scheme for this item price. If subscriptions, invoices or differential prices exist for this item price, pricing_model cannot be changed.

\n* tiered -

There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.

\n* per_unit -

A fixed price per unit quantity.

\n* flat_fee -

A fixed price that is not quantity-based.

\n* volume -

The per unit price is based on the tier that the total quantity falls in.

\n* 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" ], "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The cost of the item price when the pricing model is flat_fee.\nWhen the pricing model is per_unit\n, 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\n.

", "minimum" : 0, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The price of the item when the pricing_model is flat_fee.\nWhen the pricing model is per_unit\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nIf subscriptions or invoices exist for this item price, period_unit\ncannot be changed. The period_unit\nis mandatory when the item type\nis plan\nor addon\n.

\n

Important:\nThe period + period_unit pair must match a configured billing frequency on your site. The API does not create new frequencies. To use a new frequency (for example, 3 months or 2 weeks), add it in the site settings first. Requests with non-configured combinations fail validation.

\n* month -

A period of 1 calendar month.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "\n

If subscriptions or invoices exist for this item price, period\ncannot be changed. The period\nis mandatory when the item type\nis plan\nor addon.

\n

Important:\nThe period value, together with period_unit, must equal one of your site's configured billing frequencies. If the combination does not exist, the request fails with an invalid billing period configuration error. Configure the frequency in site settings and retry. See Addons and billing cycle.

", "minimum" : 1, "example" : null }, "trial_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for trial_period\n.

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "month" ], "example" : null }, "trial_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The trial period of the plan in trial_period_unit\ns. You can also set trial periods for addons\n; contact Support\nto enable that feature.

", "minimum" : 0, "example" : null }, "shipping_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Defines the shipping frequency. Example: to bill customer every 2 weeks, provide \"2\" here.\n", "minimum" : 1, "example" : null }, "shipping_period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines the shipping frequency in association with shipping period.\n\\* day -\n\nA period of 24 hours.\n\\* week -\n\nA period of 7 days.\n\\* year -\n\nA period of 1 calendar year.\n\\* month -\n\nA period of 1 calendar month.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The default number of billing cycles a subscription to the plan must run. Can be overridden for a subscription.\nAddons can also have billing cycles. Also, for addons, you can override this while attaching it to a plan. However, if you provide the value while applying the addon to a subscription, then that value takes still higher precedence.\nIf subscriptions, invoices or differential prices\nexist for this item price, billing_cycles\ncannot be changed.

\n

Note:\nIf you want to change the billing_cycles\nto unlimited renewals, enter an empty string. This value can only be updated if the item_price\nis not attached to a subscription or invoice. If no billing_cycles\nvalue is entered, then by default the value will be set as unlimited billing_cycles\nrenewals.

", "minimum" : 1, "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "

Applicable only when End-of-trial Action\nhas been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the item.type\nis plan\nand a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the subscription-level\n.

\n* cancel_subscription -

The subscription cancels.

\n* activate_subscription -

The subscription activates and charges are raised for non-metered items.

\n* site_default -

The action configured for the site\nat the time when the trial ends, takes effect.

", "enum" : [ "site_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "tax_detail" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_detail\n", "properties" : { "tax_profile_id" : { "type" : "string", "deprecated" : false, "description" : "The tax profile of the item price.\n", "maxLength" : 50, "example" : null }, "avalara_tax_code" : { "type" : "string", "deprecated" : false, "description" : "The [Avalara tax codes](https://taxcode.avatax.avalara.com)\nfor the item price. Applicable only if you use [AvaTax for Sales integration](https://www.chargebee.com/docs/2.0/avatax-for-sales.html)\n.\n", "maxLength" : 50, "example" : null }, "hsn_code" : { "type" : "string", "deprecated" : false, "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "maxLength" : 50, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the [Avalara sale type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* retail -\n\nTransaction is a sale to an end user\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the [Avalara transaction type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the [Avalara service type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n", "example" : null }, "taxjar_product_code" : { "type" : "string", "deprecated" : false, "description" : "The [TaxJar product code](https://developers.taxjar.com/api/reference/#get-list-tax-categories)\nfor the item price. Applicable only if you use [TaxJar integration](https://www.chargebee.com/docs/2.0/taxjar.html)\n.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "accounting_detail" : { "type" : "object", "deprecated" : false, "description" : "Parameters for accounting_detail\n", "properties" : { "sku" : { "type" : "string", "deprecated" : false, "description" : "This maps to the sku or product name in the accounting integration.\n", "maxLength" : 100, "example" : null }, "accounting_code" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the chart of accounts under which the item price falls in the accounting system.\n", "maxLength" : 100, "example" : null }, "accounting_category1" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n\n", "maxLength" : 100, "example" : null }, "accounting_category2" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n\n", "maxLength" : 100, "example" : null }, "accounting_category3" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n", "maxLength" : 100, "example" : null }, "accounting_category4" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**NetSuite:**](https://www.chargebee.com/docs/2.0/netsuite.html ) Provide the \"Revenue Recognition Rule Id\" for the product from NetSuite.\n* [**Intacct:**](https://www.chargebee.com/docs/2.0/intacct.html ) If you have configured \"Revenue Recognition Templates\" for products in Intacct, provide the template ID for the product.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tiers\n", "properties" : { "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume\n; the total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency\n.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for the addon. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20, consuming 400 units will result in a charge of $80 (4 × $20).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "field_id", "field_value", "provider_name" ], "example" : null } }, "required" : [ "id", "item_id", "name" ], "example" : null }, "encoding" : { "accounting_detail" : { "style" : "deepObject", "explode" : true }, "tax_detail" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true }, "tiers" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice", "description" : "

Resource object representing item_price

" } }, "required" : [ "item_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/attached_items/{attached-item-id}" : { "get" : { "summary" : "Retrieve an attached item", "description" : "Retrieves details of an attached addon or a charge item.\n", "operationId" : "retrieve_an_attached_item_", "parameters" : [ { "name" : "parent_item_id", "in" : "query", "description" : "

The id\nof the plan-item to which the item is attached.

", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "attached-item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/attached-item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "attached_item" : { "$ref" : "#/components/schemas/AttachedItem", "description" : "

Resource object representing attached_item

" } }, "required" : [ "attached_item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 attached item", "description" : "Updates an attached addon or a charge item for a plan.\n", "operationId" : "update_an_attached_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "attached-item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/attached-item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "parent_item_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the parent item in the attachment relationship.\n", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items.

\n* recommended -

The addon is recommended to go with the plan-item when using Checkout\nor Portal\n.

\n* optional -

The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a quantity\nand billing_cycles\nfor the addon, for when it is applied to subscriptions with the plan.

\n* mandatory -

The addon is attached automatically to the subscription for the plan-item unless explicitly removed\nvia API.

", "enum" : [ "recommended", "mandatory", "optional" ], "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires addon billing cycles\nto be enabled for the site.

\n

The value set explicitly for billing_cycles\nwhile applying the addon to a subscription\ntakes precedence over this parameter. This parameter, in turn, has a higher precedence than the value set for the addon-item price\n.

", "minimum" : 1, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The default quantity of the addon to be attached when the quantity is not specified while [creating](/docs/api/subscriptions/create-subscription-for-items)\n/[updating](/docs/api/subscriptions/update-subscription-for-items)\nthe subscription.\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the item is charged. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_creation -

the time of creation of the subscription.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* on_demand -

Item can be charged on demand

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "example" : null } }, "required" : [ "parent_item_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "attached_item" : { "$ref" : "#/components/schemas/AttachedItem", "description" : "

Resource object representing attached_item

" } }, "required" : [ "attached_item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/attached_items" : { "get" : { "summary" : "List attached items", "description" : "Returns a list of attached items satisfying **all**\nthe conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).\n", "operationId" : "list_attached_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?: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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nFilter attached items based on their id.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"bec0c324-adb6-44d3-ad4f-694f449be97c\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "bec0c324-adb6-44d3-ad4f-694f449be97c", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "item_id", "in" : "query", "description" : "

optional, string filter

\n

Filter attached items based on the item_id\nof the item being attached.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nitem_id[is] = "basic"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter attached items based on the type\nof attached item. Possible values are : recommended\n, mandatory\n, optional.\nPossible values are : recommended, mandatory, optional.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\ntype[is] = "mandatory"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "mandatory", "properties" : { "is" : { "type" : "string", "description" : "* `recommended` - The addon is recommended to go with the plan-item when using Checkout or Portal.\n* `mandatory` - The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API.\n* `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" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `recommended` - The addon is recommended to go with the plan-item when using Checkout or Portal.\n* `mandatory` - The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API.\n* `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" ], "example" : null }, "in" : { "type" : "string", "description" : "* `recommended` - The addon is recommended to go with the plan-item when using Checkout or Portal.\n* `mandatory` - The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API.\n* `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" ], "pattern" : "^\\[(recommended|mandatory|optional)(,(recommended|mandatory|optional))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `recommended` - The addon is recommended to go with the plan-item when using Checkout or Portal.\n* `mandatory` - The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API.\n* `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" ], "pattern" : "^\\[(recommended|mandatory|optional)(,(recommended|mandatory|optional))*\\]$", "example" : null } } } }, { "name" : "item_type", "in" : "query", "description" : "

optional, enumerated string filter

\n

To filter based on the type of of the attached item. Possible values are : addon\n, charge.\nPossible values are : plan, addon, charge.

\n

Supported operators :\nis, is_not, in, not_in

\n

Example →\nitem_type[is_not] = "plan"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "plan", "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "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.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null }, "not_in" : { "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.\n", "enum" : [ "plan", "addon", "charge" ], "pattern" : "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$", "example" : null } } } }, { "name" : "charge_on_event", "in" : "query", "description" : "optional, enumerated string filter\n\nIndicates when the item is charged. This attribute only applies to charge-items. Possible values are : subscription_creation, subscription_trial_start, plan_activation, subscription_activation, contract_termination, on_demand.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*charge_on_event\\[is\\] = \"subscription_creation\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "subscription_creation", "properties" : { "is" : { "type" : "string", "description" : "* `subscription_creation` - the time of creation of the subscription.\n* `subscription_trial_start` - the time when the trial period of the subscription begins.\n* `plan_activation` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed.\n* `subscription_activation` - the moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.\n* `contract_termination` - when a contract term is terminated.\n* `on_demand` - Item can be charged on demand", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `subscription_creation` - the time of creation of the subscription.\n* `subscription_trial_start` - the time when the trial period of the subscription begins.\n* `plan_activation` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed.\n* `subscription_activation` - the moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.\n* `contract_termination` - when a contract term is terminated.\n* `on_demand` - Item can be charged on demand", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "example" : null }, "in" : { "type" : "string", "description" : "* `subscription_creation` - the time of creation of the subscription.\n* `subscription_trial_start` - the time when the trial period of the subscription begins.\n* `plan_activation` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed.\n* `subscription_activation` - the moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.\n* `contract_termination` - when a contract term is terminated.\n* `on_demand` - Item can be charged on demand", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "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))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `subscription_creation` - the time of creation of the subscription.\n* `subscription_trial_start` - the time when the trial period of the subscription begins.\n* `plan_activation` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed.\n* `subscription_activation` - the moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.\n* `contract_termination` - when a contract term is terminated.\n* `on_demand` - Item can be charged on demand", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "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))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nFilter attached items based on when the attached items were last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "attached_item" : { "$ref" : "#/components/schemas/AttachedItem", "description" : "Resource object representing attached_item" } }, "required" : [ "attached_item" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 attached item", "description" : "Creates an attached addon or a charge item for a plan.\n", "operationId" : "create_an_attached_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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])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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "item_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the addon or charge that is being attached to the plan-item.\n", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items.

\n* recommended -

The addon is recommended to go with the plan-item when using Checkout\nor Portal\n.

\n* optional -

The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a quantity\nand billing_cycles\nfor the addon, for when it is applied to subscriptions with the plan.

\n* mandatory -

The addon is attached automatically to the subscription for the plan-item unless explicitly removed\nvia API.

", "enum" : [ "recommended", "mandatory", "optional" ], "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires addon billing cycles\nto be enabled for the site.

\n

The value set explicitly for billing_cycles\nwhile applying the addon to a subscription\ntakes precedence over this parameter. This parameter, in turn, has a higher precedence than the value set for the addon-item price\n.

", "minimum" : 1, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The default quantity of the addon to be attached when the quantity is not specified while [creating](/docs/api/subscriptions/create-subscription-for-items)\n/[updating](/docs/api/subscriptions/update-subscription-for-items)\nthe subscription.\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the item is charged. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_creation -

the time of creation of the subscription.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* on_demand -

Item can be charged on demand

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity for this attached_item. This is applicable only when multiple business entities have been created for the site. When provided, the operation will read or write data associated with the specified business entity. If not provided, the resource will be created at the site level, and the business_entity_id will not be included in the API response.

\n

Note: An alternative way of passing this parameter is by using a custom HTTP header or query string parameter.

\n", "maxLength" : 50, "example" : null } }, "required" : [ "item_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "attached_item" : { "$ref" : "#/components/schemas/AttachedItem", "description" : "

Resource object representing attached_item

" } }, "required" : [ "attached_item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/attached_items/{attached-item-id}/delete" : { "post" : { "summary" : "Delete an attached item", "description" : "Deletes an attached addon or a charge item.\n", "operationId" : "delete_an_attached_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "attached-item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/attached-item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "parent_item_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the addon or charge that is being attached to the plan-item.\n", "maxLength" : 100, "example" : null } }, "required" : [ "parent_item_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "attached_item" : { "$ref" : "#/components/schemas/AttachedItem", "description" : "

Resource object representing attached_item

" } }, "required" : [ "attached_item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/differential_prices/{differential-price-id}/delete" : { "post" : { "summary" : "Delete a differential price", "description" : "

Delete a differential price using a differential_price_id\nand item_price_id\n.

", "operationId" : "delete_a_differential_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "differential-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/differential-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price (addon\nor charge\n) whose price should change according to the plan-item it is applied to.

", "maxLength" : 100, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "differential_price" : { "$ref" : "#/components/schemas/DifferentialPrice", "description" : "

Resource object representing differential_price

" } }, "required" : [ "differential_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/differential_prices" : { "post" : { "summary" : "Create a differential price", "description" : "Create a differential price for addon item price, addon item price with tiered pricing, or charge item price.\n", "operationId" : "create_a_differential_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "parent_item_id" : { "type" : "string", "deprecated" : false, "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*\nor *Enterprise*\nplans-items mentioned in the [examples above](/docs/api/differential_prices)\n.\n", "maxLength" : 100, "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The differential price. If the pricing model of the item_price_id\nis tiered\n, volume\n, or stairstep\n, pass tiers\ninstead of this.

", "minimum" : 0, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The price of the item when the pricing_model is flat_fee.\nWhen the pricing model is per_unit\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity for this differential_price. This is applicable only when multiple business entities have been created for the site. When provided, the operation will read or write data associated with the specified business entity. If not provided, the resource will be created at the site level, and the business_entity_id will not be included in the API response.

\n

Note: An alternative way of passing this parameter is by using a custom HTTP header or query string parameter.

\n", "maxLength" : 50, "example" : null }, "parent_periods" : { "type" : "object", "deprecated" : false, "description" : "Parameters for parent_periods\n", "properties" : { "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period\n.

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The billing period of the plan in period_unit\ns. For example, a 6 month plan has period\nas 6 and period_unit\nas month.

\n

Note\nFor a charge-item price,

", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null } }, "required" : [ "period_unit" ], "example" : null }, "tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tiers\n", "properties" : { "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume\n; the total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency\n.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for the addon. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "parent_item_id" ], "example" : null }, "encoding" : { "parent_periods" : { "style" : "deepObject", "explode" : true }, "tiers" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "differential_price" : { "$ref" : "#/components/schemas/DifferentialPrice", "description" : "

Resource object representing differential_price

" } }, "required" : [ "differential_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/differential_prices" : { "get" : { "summary" : "List differential prices", "description" : "Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).\n", "operationId" : "list_differential_prices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "item_price_id", "in" : "query", "description" : "

optional, string filter

\n

The id of the item price (addon\nor charge\n) whose price should change according to the plan-item it is applied to.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nitem_price_id[is] = "day-pass-USD"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "day-pass-USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "item_id", "in" : "query", "description" : "optional, string filter\n\nItem Id of Addon / Charge item price for which differential pricing is applied to.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*item_id\\[is\\] = \"day-pass\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "day-pass", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nA unique and immutable id for the differential price. It is auto-generated when the differential price is created.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"defcc4f1-f21f-47f4-8019-beddb9beab5f\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "defcc4f1-f21f-47f4-8019-beddb9beab5f", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "parent_item_id", "in" : "query", "description" : "optional, string filter\n\nThe 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*\nor *Enterprise*\nplans-items mentioned in the [examples above](/docs/api/differential_prices)\n.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*parent_item_id\\[is_not\\] = \"basic\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "differential_price" : { "$ref" : "#/components/schemas/DifferentialPrice", "description" : "Resource object representing differential_price" } }, "required" : [ "differential_price" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/differential_prices/{differential-price-id}" : { "get" : { "summary" : "Retrieve a differential price", "description" : "

Retrieve a differential price using a differential_price_id\nand item_price_id\n.

", "operationId" : "retrieve_a_differential_price", "parameters" : [ { "name" : "item_price_id", "in" : "query", "description" : "

The id of the item price (addon\nor charge\n) whose price should change according to the plan-item it is applied to.

", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})):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1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "differential-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/differential-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "differential_price" : { "$ref" : "#/components/schemas/DifferentialPrice", "description" : "

Resource object representing differential_price

" } }, "required" : [ "differential_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 differential price", "description" : "

Update a differential price using a differential_price_id\nand item_price_id\n.

", "operationId" : "update_a_differential_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "differential-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/differential-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price (addon\nor charge\n) whose price should change according to the plan-item it is applied to.

", "maxLength" : 100, "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The differential price. If the pricing model of the item_price_id\nis tiered\n, volume\n, or stairstep\n, pass tiers\ninstead of this.

", "minimum" : 0, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The price of the item when the pricing_model is flat_fee.\nWhen the pricing model is per_unit\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "parent_periods" : { "type" : "object", "deprecated" : false, "description" : "Parameters for parent_periods\n", "properties" : { "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period\n.

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The billing period of the plan in period_unit\ns. For example, a 6 month plan has period\nas 6 and period_unit\nas month.

\n

Note\nFor a charge-item price,

", "items" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "example" : null } }, "required" : [ "period_unit" ], "example" : null }, "tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tiers\n", "properties" : { "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume\n; the total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency\n.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for the addon. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "encoding" : { "parent_periods" : { "style" : "deepObject", "explode" : true }, "tiers" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "differential_price" : { "$ref" : "#/components/schemas/DifferentialPrice", "description" : "

Resource object representing differential_price

" } }, "required" : [ "differential_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/configurations" : { "get" : { "summary" : "List site configurations", "description" : "Returns a list of your domain and product catalog version details.\n", "operationId" : "list_site_configurations", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "configurations" : { "type" : "array", "description" : "

Resource object representing configuration

", "items" : { "$ref" : "#/components/schemas/Configuration", "description" : "Resource object representing configuration" }, "example" : null } }, "required" : [ "configurations" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/features" : { "get" : { "summary" : "List features", "description" : "Retrieves a list of features meeting **all**\nthe conditions specified in the filter parameters.\n", "operationId" : "list_features", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "name", "in" : "query", "description" : "

optional, string filter

\n

A case-sensitive unique name for the feature. For example: user license\n, data storage\n, Salesforce Integration\n, devices\n, UHD Streaming\n, and so on.

\n

Note:\nThis name is not displayed on any customer-facing documents or pages such as invoice PDFs\nor hosted pages.\nHowever, in the future, it is likely to be introduced on the Self-Serve Portal\n.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nname[is] = "User licenses"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "User licenses", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "id", "in" : "query", "description" : "

optional, string filter

\n

A unique and immutable identifier for the feature. You can set it yourself, in which case it is recommended that a human-readable format (or slug) be used. For example, number-of-users-ccjht01.\nWhen not provided, a random value is automatically set.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nid[is] = "fea-user-licenses"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "fea-user-licenses", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe current status of the feature. Possible values are : active, archived, draft.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"active\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - A draft or an archived feature can be changed to active. Any item or subscription entitlements defined for the feature take effect immediately.\n* `archived` - An active feature can be changed to archived. Once archived, no new item or subscription entitlements can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active, remain effective.\n* `draft` - The feature is in an unpublished state. Item and subscription entitlements can be created for a draft feature but they are not effective until the feature is active. A feature status cannot be changed back to draft once it is in active or archived status.", "enum" : [ "active", "archived", "draft" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - A draft or an archived feature can be changed to active. Any item or subscription entitlements defined for the feature take effect immediately.\n* `archived` - An active feature can be changed to archived. Once archived, no new item or subscription entitlements can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active, remain effective.\n* `draft` - The feature is in an unpublished state. Item and subscription entitlements can be created for a draft feature but they are not effective until the feature is active. A feature status cannot be changed back to draft once it is in active or archived status.", "enum" : [ "active", "archived", "draft" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - A draft or an archived feature can be changed to active. Any item or subscription entitlements defined for the feature take effect immediately.\n* `archived` - An active feature can be changed to archived. Once archived, no new item or subscription entitlements can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active, remain effective.\n* `draft` - The feature is in an unpublished state. Item and subscription entitlements can be created for a draft feature but they are not effective until the feature is active. A feature status cannot be changed back to draft once it is in active or archived status.", "enum" : [ "active", "archived", "draft" ], "pattern" : "^\\[(active|archived|draft)(,(active|archived|draft))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - A draft or an archived feature can be changed to active. Any item or subscription entitlements defined for the feature take effect immediately.\n* `archived` - An active feature can be changed to archived. Once archived, no new item or subscription entitlements can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active, remain effective.\n* `draft` - The feature is in an unpublished state. Item and subscription entitlements can be created for a draft feature but they are not effective until the feature is active. A feature status cannot be changed back to draft once it is in active or archived status.", "enum" : [ "active", "archived", "draft" ], "pattern" : "^\\[(active|archived|draft)(,(active|archived|draft))*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe type of feature. Possible values are : switch, custom, quantity, range.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is\\] = \"boolean\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "boolean", "properties" : { "is" : { "type" : "string", "description" : "* `switch` - A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all.\n* `custom` - The entitlement levels available for this feature are defined as a set of custom values. For example, a feature Email Support can have entitlement levels as 24×7 and 24×5.\n* `quantity` - The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with name such as number of users can have entitlement levels of say, 5, 20, 50, and 100. levels[is_unlimited] is used for specifying the “unlimited” entitlement level.\n* `range` - The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as number of users can have entitlement levels starting at 5 users and go up to 50000. levels[is_unlimited] is used for specifying the “unlimited” entitlement level.", "enum" : [ "switch", "custom", "quantity", "range" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `switch` - A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all.\n* `custom` - The entitlement levels available for this feature are defined as a set of custom values. For example, a feature Email Support can have entitlement levels as 24×7 and 24×5.\n* `quantity` - The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with name such as number of users can have entitlement levels of say, 5, 20, 50, and 100. levels[is_unlimited] is used for specifying the “unlimited” entitlement level.\n* `range` - The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as number of users can have entitlement levels starting at 5 users and go up to 50000. levels[is_unlimited] is used for specifying the “unlimited” entitlement level.", "enum" : [ "switch", "custom", "quantity", "range" ], "example" : null }, "in" : { "type" : "string", "description" : "* `switch` - A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all.\n* `custom` - The entitlement levels available for this feature are defined as a set of custom values. For example, a feature Email Support can have entitlement levels as 24×7 and 24×5.\n* `quantity` - The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with name such as number of users can have entitlement levels of say, 5, 20, 50, and 100. levels[is_unlimited] is used for specifying the “unlimited” entitlement level.\n* `range` - The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as number of users can have entitlement levels starting at 5 users and go up to 50000. levels[is_unlimited] is used for specifying the “unlimited” entitlement level.", "enum" : [ "switch", "custom", "quantity", "range" ], "pattern" : "^\\[(switch|custom|quantity|range)(,(switch|custom|quantity|range))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `switch` - A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all.\n* `custom` - The entitlement levels available for this feature are defined as a set of custom values. For example, a feature Email Support can have entitlement levels as 24×7 and 24×5.\n* `quantity` - The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with name such as number of users can have entitlement levels of say, 5, 20, 50, and 100. levels[is_unlimited] is used for specifying the “unlimited” entitlement level.\n* `range` - The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as number of users can have entitlement levels starting at 5 users and go up to 50000. levels[is_unlimited] is used for specifying the “unlimited” entitlement level.", "enum" : [ "switch", "custom", "quantity", "range" ], "pattern" : "^\\[(switch|custom|quantity|range)(,(switch|custom|quantity|range))*\\]$", "example" : null } } } }, { "name" : "metered", "in" : "query", "description" : "optional, boolean filter\n\nSpecifies whether the feature is a metered feature.\n\n**Supported operators :**\nis\n\n**Example →**\n*metered\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature", "description" : "Resource object representing feature" } }, "required" : [ "feature" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 feature", "description" : "Creates a new feature. \n**Note:** This operation creates non-metered features only. To create a metered feature, use the [Create a metered feature](/docs/api/metered_features#create_a_metered_feature) operation.\n", "operationId" : "create_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-f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name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

A unique and immutable identifier for the feature. You can set it yourself, in which case it is recommended that a human-readable format (or slug) be used. For example, number-of-users-ccjht01.\nWhen not provided, a random value is automatically set.

", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive unique name for the feature. For example: user license\n, data storage\n, Salesforce Integration\n, devices\n, UHD Streaming\n, and so on.

\n

Note:\nThis name is not displayed on any customer-facing documents or pages such as invoice PDFs\nor hosted pages.\nHowever, in the future, it is likely to be introduced on the Self-Serve Portal\n.

", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "

A brief description of the feature. For example: Access to 10TB cloud storage\n.

", "maxLength" : 500, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of feature.

\n* quantity -

The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with name\nsuch as number of users\ncan have entitlement levels of say, 5\n, 20\n, 50\n, and 100.\nlevels[is_unlimited]\nis used for specifying the "unlimited" entitlement level.

\n* range -

The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as number of users\ncan have entitlement levels starting at 5\nusers and go up to 50000.\nlevels[is_unlimited]\nis used for specifying the "unlimited" entitlement level.

\n* switch -

A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all.

\n* custom -

The entitlement levels available for this feature are defined as a set of custom values. For example, a feature Email Support\ncan have entitlement levels as 24×7\nand 24×5\n.

", "enum" : [ "switch", "custom", "quantity", "range" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The current status of the feature.

\n* active -

A draft\nor an archived\nfeature can be changed to active.\nAny entitlements\nor subscription entitlements\ndefined for the feature take effect immediately.

\n* draft -

The feature is in an unpublished state. Entitlements\nand subscription entitlements\ncan be created for a draft feature but they are not effective until the feature is active. A feature status\ncannot be changed back to draft\nonce it is in active\nor archived\nstatus\n.

", "enum" : [ "active", "draft" ], "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "description" : "

For features of type\nquantity\nor range\n, this specifies the unit of measure. The value is expected in the singular form and when used by the system, it is pluralized automatically as needed. For example, for a feature such as user licenses\n, the unit\ncan be license\n.

", "maxLength" : 50, "example" : null }, "levels" : { "type" : "object", "deprecated" : false, "description" : "Parameters for levels\n", "properties" : { "name" : { "type" : "array", "description" : "

A case-sensitive display name for the entitlement level. Provide a name that helps you clearly identify the entitlement level. For example: a feature such as Email Support\ncan have entitlement levels named as All weekdays\n, All days\n, 40 hours per week\nand so on.

\n

When not provided for feature.type\nquantity\nor range\n, this name is auto-generated as the space-separated concatenation of levels[].value\nand the pluralized version of unit.\nFor example, if levels[].value\nis 20\nand unit\nis user\n, then levels[].name\nbecomes 20 users\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value denoting the entitlement level granted.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "is_unlimited" : { "type" : "array", "description" : "

When type is quantity or range, this attribute indicates whether the entitlement level corresponds to unlimited units of the feature. Possible values are:

\n\n

Either this or levels[value] should be passed.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "level" : { "type" : "array", "description" : "

Represents the order of the entitlement levels from lowest to highest.

\n\n

When not defined, it is assumed as the index of the levels[] array.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "name" ], "example" : null }, "encoding" : { "levels" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature", "description" : "

Resource object representing feature

" } }, "required" : [ "feature" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/features/{feature-id}/delete" : { "post" : { "summary" : "Delete a feature", "description" : "

Deletes a feature. Any entitlements and subscription entitlements defined for the feature are also removed. This action is not permissible when the status\nof the feature is active\n.

", "operationId" : "delete_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature", "description" : "

Resource object representing feature

" } }, "required" : [ "feature" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/features/{feature-id}" : { "get" : { "summary" : "Retrieve a feature", "description" : "Retrieve a specific feature using its ID.\n", "operationId" : "retrieve_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature", "description" : "

Resource object representing feature

" } }, "required" : [ "feature" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 feature", "description" : "

Updates a specific feature.

Note

The list of objects levels[] provided as part of this operation fully replaces the existing list of objects levels[] of the feature.

Considerations when modifying levels

This section describes validations that are performed by Chargebee when modifying the levels list of objects for the feature, using this operation.

Adding levels

Adding a new object to the levels[] list is allowed if and only if the feature type is quantity or custom

Removing levels

Removing an existing object in the levels[] list is not allowed if the value for that object is currently mapped to one or more item_entitlements or subscription_entitlements.

Reordering levels

Note

The validation described in this section is only applicable for features of type custom

If any of levels[].value are currently mapped to item_entitlements or subscription_entitlements, then the relative order of the corresponding levels[].level must be preserved when invoking this operation.

For example, consider that the levels[] list is currently in the state shown below. (For brevity, only the value and level key are shown here and the JSONs have been compacted.)

\n{\n    "levels":[{\n        "value":"email-basic",\n        "level":0\n    },{\n        "value":"email-rise",\n        "level":1\n    },{\n        "value":"email-advanced",\n        "level":2\n    },{\n        "value":"email-pro",\n        "level":3\n    },{\n        "value":"email-scale",\n        "level":4\n    }]\n}\n\n

Now consider that email-rise, email-advanced, and email-pro have already been mapped to item_entitlements or subscription_entitlements. As seen in the above object, the relative order of levels[].level is such that email-rise < email-advanced < email-pro.

Invoking this API to change levels[] to the state below is allowed since the relative order of level corresponding to email-rise, email-advanced, and email-pro has been preserved.

\n{\n    "levels":[{\n        "value":"email-basic",\n        "level":0\n    },{\n        "value":"email-rise",\n        "level":1\n    },{\n        "value":"email-scale",\n        "level":2\n    },{\n        "value":"email-advanced",\n        "level":3\n    },{\n        "value":"email-pro",\n        "level":4\n    }]\n}\n\n

However, changing levels[] to the state shown below is not permissible because the level of email-advanced is provided as greater than the level of email-pro, thereby disrupting the original order.

\n{\n    "levels":[{\n        "value":"email-basic",\n        "level":0\n    },{\n        "value":"email-rise",\n        "level":1\n    },{\n        "value":"email-pro",\n        "level":2\n    },{\n        "value":"email-advanced",\n        "level":3\n    },{\n        "value":"email-scale",\n        "level":4\n    }]\n}\n\n
", "operationId" : "update_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive unique name for the feature. For example: user license\n, data storage\n, Salesforce Integration\n, devices\n, UHD Streaming\n, and so on.

\n

Note:\nThis name is not displayed on any customer-facing documents or pages such as invoice PDFs\nor hosted pages.\nHowever, in the future, it is likely to be introduced on the Self-Serve Portal\n.

", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "

A brief description of the feature. For example: Access to 10TB cloud storage\n.

", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The current status of the feature.

\n* active -

A draft\nor an archived\nfeature can be changed to active.\nAny entitlements\nor subscription entitlements\ndefined for the feature take effect immediately.

\n* draft -

The feature is in an unpublished state. Entitlements\nand subscription entitlements\ncan be created for a draft feature but they are not effective until the feature is active. A feature status\ncannot be changed back to draft\nonce it is in active\nor archived\nstatus\n.

\n* archived -

An active\nfeature can be changed to archived.\nOnce archived\n, no new\nentitlements\nor subscription entitlements\ncan be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active\n, remain effective.

", "enum" : [ "active", "archived", "draft" ], "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "description" : "

For features of type\nquantity\nor range\n, this specifies the unit of measure. The value is expected in the singular form and when used by the system, it is pluralized automatically as needed. For example, for a feature such as user licenses\n, the unit\ncan be license\n.

", "maxLength" : 50, "example" : null }, "levels" : { "type" : "object", "deprecated" : false, "description" : "Parameters for levels\n", "properties" : { "name" : { "type" : "array", "description" : "

A case-sensitive display name for the entitlement level. Provide a name that helps you clearly identify the entitlement level. For example: a feature such as Email Support\ncan have entitlement levels named as All weekdays\n, All days\n, 40 hours per week\nand so on.

\n

When not provided for feature.type\nquantity\nor range\n, this name is auto-generated as the space-separated concatenation of levels[].value\nand the pluralized version of unit.\nFor example, if levels[].value\nis 20\nand unit\nis user\n, then levels[].name\nbecomes 20 users\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The value denoting the entitlement level granted.

\n\n

Note

This must be provided exactly as it already exists for the feature if the value is currently mapped to an entitlements or subscription_entitlements.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "is_unlimited" : { "type" : "array", "description" : "

When type is quantity or range, this attribute indicates whether the entitlement level corresponds to unlimited units of the feature. Possible values are:

\n\n

Either this or levels[value] should be passed.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "level" : { "type" : "array", "description" : "

Represents the order of the entitlement levels from lowest to highest.

\n\n

When not defined, it is assumed as the index of the levels[] array.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "levels" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature", "description" : "

Resource object representing feature

" } }, "required" : [ "feature" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/features/{feature-id}/archive_command" : { "post" : { "summary" : "Archive a feature", "description" : "

Archives an active feature so that no new entitlements or subscription entitlements can be created towards the feature. Any pre-existing item or subscription entitlements from the time that the feature was active remain effective. This operation changes the status of the feature to archived.

\n

Prerequisites & Constraints

", "operationId" : "archive_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature", "description" : "

Resource object representing feature

" } }, "required" : [ "feature" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/features/{feature-id}/activate_command" : { "post" : { "summary" : "Activate a feature", "description" : "

Activates a draft feature so that any entitlements or subscription entitlements defined towards it take effect immediately. This operation changes the status of the feature to active.

\n

Prerequisites & Constraints

", "operationId" : "activate_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature", "description" : "

Resource object representing feature

" } }, "required" : [ "feature" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/features/{feature-id}/reactivate_command" : { "post" : { "summary" : "Reactivate a feature", "description" : "

Reactivates an archived feature so that new entitlements or subscription entitlements can be created towards the feature. This operation changes the status of the feature to active.

\n

Prerequisites & Constraints

", "operationId" : "reactivate_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature", "description" : "

Resource object representing feature

" } }, "required" : [ "feature" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_units" : { "get" : { "summary" : "List credit units", "description" : "Retrieves a paginated list of credit units meeting **all** the conditions specified in the filter parameters.\n", "operationId" : "list_credit_units", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset obtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe current lifecycle status of the credit unit. Possible values are : active, archived.\n\n**Supported operators :**\nis, in\n\n**Example →**\n*status\\[is\\] = \"active\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "in" : { "type" : "string", "description" : "\\* \\`active\\` - The credit unit is active. \\* \\`archived\\` - The credit unit is archived; it can be reactivated.\n", "enum" : [ "active", "archived" ], "pattern" : "^\\[(active|archived)(,(active|archived))*\\]$", "example" : null }, "is" : { "type" : "string", "description" : "\\* \\`active\\` - The credit unit is active. \\* \\`archived\\` - The credit unit is archived; it can be reactivated.\n", "enum" : [ "active", "archived" ], "example" : null } } } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nThe unique identifier of the credit unit.\n**Supported operators :**\nis, in\n\n**Example →**\n*id\\[is\\] = \"ai_tokens_001\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "ai-tokens", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "credit_unit" : { "$ref" : "#/components/schemas/CreditUnit", "description" : "Resource object representing credit_unit" } }, "required" : [ "credit_unit" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 credit unit", "description" : "

Creates a new credit unit in the active status.

", "operationId" : "create_a_credit_unit", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier for the credit unit. Must be unique across the site.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "Internal display name for the credit unit. Must be unique across the site.\n", "maxLength" : 50, "example" : null }, "is_unlimited" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the credit unit allows unlimited overdraft consumption. When true, grace consumption continues without a cap after the allocated grants are exhausted. When false, provide overdraft_amount to cap the grace consumption.

", "example" : null }, "overdraft_amount" : { "type" : "string", "deprecated" : false, "description" : "

The amount up to which grace consumption is allowed after the allocated grants are exhausted. A positive decimal value that applies only when is_unlimited is false.

", "maxLength" : 50, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "

Customer-facing display name for the credit unit. Must be unique across the site.\nDefaults to name when omitted.

", "maxLength" : 50, "example" : null } }, "required" : [ "id", "is_unlimited", "name" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_unit" : { "$ref" : "#/components/schemas/CreditUnit", "description" : "

Resource object representing credit unit

" } }, "required" : [ "credit_unit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_units/{credit-unit-id}/archive_command" : { "post" : { "summary" : "Archive a credit unit", "description" : "

Archives an active credit unit. Once archived, the credit unit can no longer be used to create grant configurations for items and grant configuration overrides for subscriptions. Any grants that were already configured for this credit unit will continue to be effective.

", "operationId" : "archive_a_credit_unit", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-unit-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-unit-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_unit" : { "$ref" : "#/components/schemas/CreditUnit", "description" : "

Resource object representing credit unit

" } }, "required" : [ "credit_unit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_units/{credit-unit-id}" : { "post" : { "summary" : "Update a credit unit", "description" : "Updates an existing credit unit.\n", "operationId" : "update_a_credit_unit", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-unit-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-unit-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "Updated internal display name for the credit unit. Must be unique across the site.\n", "maxLength" : 50, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "

Updated customer-facing display name for the credit unit. Must be unique across the site.\nAt least one of name or external_name should be provided.\nOnly credit units with the active status can be updated.

", "maxLength" : 50, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_unit" : { "$ref" : "#/components/schemas/CreditUnit", "description" : "

Resource object representing credit unit

" } }, "required" : [ "credit_unit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_units/{credit-unit-id}/reactivate_command" : { "post" : { "summary" : "Reactivate a credit unit", "description" : "

Reactivates an archived credit unit. Once reactivated, the credit unit can be used to configure grants for plans, add-ons, and charges, as well as grant configuration overrides for subscriptions.

", "operationId" : "reactivate_a_credit_unit", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|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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(?:[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "credit-unit-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-unit-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_unit" : { "$ref" : "#/components/schemas/CreditUnit", "description" : "

Resource object representing credit unit

" } }, "required" : [ "credit_unit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/subscription_entitlements/set_availability" : { "post" : { "summary" : "Enable or disable subscription entitlements", "description" : "

Enables or disables specific subscription_entitlements for a subscription.

", "operationId" : "enable_or_disable_subscription_entitlements", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "is_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Specifies whether the subscription_entitlements\nare to be enabled or disabled.

", "example" : null }, "subscription_entitlements" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_entitlements\n", "properties" : { "feature_id" : { "type" : "array", "description" : "

The id\nof the feature towards which the subscription_entitlement\nis to be enabled or disabled. An error is returned if a subscription_entitlement\ndoes not exist for the feature.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "feature_id" ], "example" : null } }, "required" : [ "is_enabled" ], "example" : null }, "encoding" : { "subscription_entitlements" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "subscription_entitlement" : { "$ref" : "#/components/schemas/SubscriptionEntitlement", "description" : "Resource object representing subscription_entitlement" } }, "required" : [ "subscription_entitlement" ], "example" : null }, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/subscription_entitlements" : { "get" : { "summary" : "List subscription entitlements", "description" : "

Retrieves the list of subscription_entitlements for the subscription.

Note:

The components attribute is not returned for any of the subscription_entitlements. Use the retrieve operation(coming soon) to obtain the components.

", "operationId" : "list_subscription_entitlements", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "subscription_entitlement" : { "$ref" : "#/components/schemas/SubscriptionEntitlement", "description" : "Resource object representing subscription_entitlement" } }, "required" : [ "subscription_entitlement" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/customer_entitlements" : { "get" : { "summary" : "List customer entitlements", "description" : "

Tip

To retrieve subscription entitlements for a specific subscription, use the List subscription entitlements API.

Returns a list of customer_entitlement objects for the specified customer. The entitlements returned are for active subscriptions only. Specifically, these are subscriptions with a status of active or non_renewing.

Pagination

Pagination works differently for this endpoint than other List endpoints in the Billing API. In other list endpoints, the limit parameter sets the limit on the total number of objects returned in the response. However, in this endpoint, the limit parameter defines the number of features for which the customer_entitlement objects are returned. For example, if limit = n, then all customer_entitlement objects for up to n features are returned.

Let's look at an example:

Features

Consider the following three features defined in Chargebee for a project management software:

    \n
  • User Licenses
  • \n
  • Support Level
  • \n
  • Xero Integration
  • \n

The feature objects are listed below:

Feature 1
\n{\n    "feature": {\n        "id": "user-licenses",\n        "name": "User Licenses",\n        "description": "Maximum number of user licenses allowed.",\n        "status": "active",\n        "type": "quantity",\n        "unit": "licence",\n        "levels": [\n            {\n                "name": "3 licences",\n                "value": "3",\n                "is_unlimited": false,\n                "level": 1\n            },\n            {\n                "name": "10 licences",\n                "value": "10",\n                "is_unlimited": false,\n                "level": 2\n            },\n            {\n                "name": "25 licences",\n                "value": "25",\n                "is_unlimited": false,\n                "level": 3\n            },\n            {\n                "name": "Unlimited licence",\n                "value": "Unlimited",\n                "is_unlimited": true,\n                "level": 4\n            }\n        ],\n        "object": "feature"\n    }\n}\n\n
Feature 2
\n{\n    "feature": {\n        "id": "support-level",\n        "name": "Support Level",\n        "description": "Level of support offered.",\n        "status": "active",\n        "type": "custom",\n        "levels": [\n            {\n                "name": "Email",\n                "value": "Email",\n                "is_unlimited": false,\n                "level": 1\n            },\n            {\n                "name": "Chat",\n                "value": "Chat",\n                "is_unlimited": false,\n                "level": 2\n            },\n            {\n                "name": "Calls",\n                "value": "Calls",\n                "is_unlimited": false,\n                "level": 3\n            }\n        ],\n        "object": "feature"\n    }\n}\n\n
Feature 3
\n{\n    "feature": {\n        "id": "xero-integration",\n        "name": "Xero Integration",\n        "description": "Integrate your Chargebee site with Xero",\n        "status": "active",\n        "type": "switch",\n        "object": "feature"\n    }\n}\n\n
Subscriptions

Now consider that a customer c1 has two subscriptions: s1 and s2.

Subscription entitlements

Consider the following subscription entitlements for s1 and s2:

Subscription idFeature NameEntitlement Value
s1User Licenses3
s1Support LevelEmail
s2User Licenses10
s2Support LevelChat
s2Xero Integrationtrue
API responses

API calls to this endpoint work as follows:

First call

Consider the first call with limit set to 2.

\nGET /api/v2/customers/c1/customer_entitlements?limit=2\n\n
Response
\n{\n    "list": [\n        {\n            "customer_entitlement": {\n                "customer_id": "c1",\n                "subscription_id": "s1",\n                "feature_id": "user-licenses",\n                "value": "3",\n                "name": "3 licences",\n                "is_enabled": true,\n                "object": "customer_entitlement"\n            }\n        },\n        {\n            "customer_entitlement": {\n                "customer_id": "c1",\n                "subscription_id": "s2",\n                "feature_id": "xero-integration",\n                "value": "true",\n                "name": "Available",\n                "is_enabled": true,\n                "object": "customer_entitlement"\n            }\n        },\n        {\n            "customer_entitlement": {\n                "customer_id": "c1",\n                "subscription_id": "s2",\n                "feature_id": "user-licenses",\n                "value": "10",\n                "name": "10 licences",\n                "is_enabled": true,\n                "object": "customer_entitlement"\n            }\n        }\n    ],\n    "next_offset": "2"\n}\n\n

Since limit = 2, the API returns the customer_entitlement for two features: User Licenses and Xero Integration. Three objects are returned, corresponding to rows 1, 3, and 5 in the table above.

Second call

We now retrieve the next page of the list in the second call by setting offset to the value of next_offset obtained from the previous response.

\n    GET /api/v2/customers/c1/customer_entitlements?limit=2&offset=2\n\n
Response
\n{\n    "list": [\n        {\n            "customer_entitlement": {\n                "customer_id": "c1",\n                "subscription_id": "s1",\n                "feature_id": "support-level",\n                "value": "Email",\n                "name": "Email",\n                "is_enabled": true,\n                "object": "customer_entitlement"\n            }\n        },\n        {\n            "customer_entitlement": {\n                "customer_id": "c1",\n                "subscription_id": "s2",\n                "feature_id": "support-level",\n                "value": "Chat",\n                "name": "Chat",\n                "is_enabled": true,\n                "object": "customer_entitlement"\n            }\n        }\n    ]\n}\n\n

Although limit = 2, the customer_entitlement objects for only one more feature, namely, Support Level are returned because the remaining were covered in the previous page. No more customer_entitlement objects remain for the customer, as indicated by the absence of the next_offset attribute in the response. The returned objects in this last call correspond to rows 2 and 4 in the table above.

", "operationId" : "list_customer_entitlements", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "

The number of features for which to return customer_entitlement\nobjects.

\n

See also\nPagination for List customer entitlements.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "consolidate_entitlements", "in" : "query", "description" : "

When set to true\n, the response returns a unified view of entitlement values for each feature across the customer. This includes entitlements assigned directly to the customer as well as those inherited from any of the customer's subscriptions. In this mode, the subscription_id\nfield is omitted from the response objects. The consolidated entitlement value is derived using the same logic described in the Subscription Entitlements documentation\n, based on the feature type.

", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "customer_entitlement" : { "$ref" : "#/components/schemas/CustomerEntitlement", "description" : "Resource object representing customer_entitlement" } }, "required" : [ "customer_entitlement" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/features/{feature-id}/item_entitlements" : { "get" : { "summary" : "List item entitlements for a feature", "description" : "

Deprecated\nThis operation is deprecated and no longer maintained. Migrate your integration to List entitlements.

Retrieves a list of all the item_entitlement\ns for the feature\nspecified.

", "operationId" : "list_item_entitlements_for_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item_entitlement" : { "$ref" : "#/components/schemas/ItemEntitlement", "description" : "Resource object representing item_entitlement" } }, "required" : [ "item_entitlement" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "Upsert or remove item entitlements for a feature", "description" : "

Deprecated\nThis operation is deprecated and no longer maintained. Migrate your integration to Manage entitlements.

Warning\nThis operation is not supported when grandfathering is enabled.

Upserts or removes a set of item_entitlements for an feature depending on the action specified. The API returns the upserted or deleted item_entitlements after successfully completing the operation. The operation returns an error when the first item_entitlement fails to be processed. Either all the item_entitlements provided in the request are processed or none.

", "operationId" : "upsert_or_remove_item_entitlements_for_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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,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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "action" : { "type" : "string", "deprecated" : false, "description" : "

The specific action to be performed for each item_entitlement\nspecified.

\n* remove -

Deletes the item_entitlement\nfor the feature_id\nand item_id\ncombination, if it exists.

\n* upsert -

If the item_entitlement\nalready exists for the feature_id\nand item_id\ncombination, the value\nof the item_entitlement\nis updated. If it doesn't exist, a new item_entitelment\nis created.

", "enum" : [ "upsert", "remove" ], "example" : null }, "item_entitlements" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_entitlements\n", "properties" : { "item_id" : { "type" : "array", "description" : "

The id\nof the item\nto which this entitlement belongs.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type\nof the item\nto which this entitlement belongs.

\n* plan -

Plan

\n* item -

Item

\n* subscription -

Subscription

\n* addon -

Addon

\n* charge -

Charge

", "enum" : [ "plan", "addon", "charge", "subscription", "item" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "item_id" ], "example" : null } }, "required" : [ "action" ], "example" : null }, "encoding" : { "item_entitlements" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item_entitlement" : { "$ref" : "#/components/schemas/ItemEntitlement", "description" : "Resource object representing item_entitlement" } }, "required" : [ "item_entitlement" ], "example" : null }, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/item_entitlements" : { "get" : { "summary" : "List item entitlements for an item", "description" : "

Deprecated\nThis operation is deprecated and no longer maintained. Migrate your integration to List entitlements.

Retrieves a list of all the item_entitlements\nfor the item\nspecified.

", "operationId" : "list_item_entitlements_for_an_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item_entitlement" : { "$ref" : "#/components/schemas/ItemEntitlement", "description" : "Resource object representing item_entitlement" } }, "required" : [ "item_entitlement" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "Upsert or remove item entitlements for an item", "description" : "

Deprecated\nThis operation is deprecated and no longer maintained. Migrate your integration to Manage entitlements.

Warning\nThis operation is not supported when grandfathering is enabled.

Upserts or removes a set of item_entitlements for an item depending on the action specified. The API returns the upserted or deleted item_entitlements after successfully completing the operation. The operation returns an error when the first item_entitlement fails to be processed. Either all the item_entitlements provided in the request are processed or none.

", "operationId" : "upsert_or_remove_item_entitlements_for_an_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "action" : { "type" : "string", "deprecated" : false, "description" : "

The specific action to be performed for each item_entitlement\nspecified.

\n* remove -

Deletes the item_entitlement\nfor the feature_id\nand item_id\ncombination, if it exists.

\n* upsert -

If the item_entitlement\nalready exists for the feature_id\nand item_id\ncombination, the value\nof the item_entitlement\nis updated. If it doesn't exist, a new item_entitelment\nis created.

", "enum" : [ "upsert", "remove" ], "example" : null }, "item_entitlements" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_entitlements\n", "properties" : { "feature_id" : { "type" : "array", "description" : "

The id\nof the feature towards which this entitlement has been granted.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "feature_id" ], "example" : null } }, "required" : [ "action" ], "example" : null }, "encoding" : { "item_entitlements" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "item_entitlement" : { "$ref" : "#/components/schemas/ItemEntitlement", "description" : "Resource object representing item_entitlement" } }, "required" : [ "item_entitlement" ], "example" : null }, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/entitlements" : { "get" : { "summary" : "List entitlements", "description" : "

Retrieves a list of all the entitlements associated with the specified feature.

", "operationId" : "list_all_entitlements", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "feature_id", "in" : "query", "description" : "

optional, string filter

\n

The id\nof the feature associated with this entitlement.\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nfeature_id[is] = "user-licenses"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "user-licenses", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "entity_type", "in" : "query", "description" : "

optional, enumerated string filter

\n

The type\nof the entity\nto which this entitlement belongs. Possible values are : plan, addon, charge, plan_price, addon_price.

\n

Supported operators :\nis, is_not, in, not_in, in, not_in

\n

Example →\nentity_type[in] = "plan_price"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "plan_price", "properties" : { "in" : { "type" : "string", "description" : "\\* \\`plan\\` - Plan \\* \\`addon\\` - Addon \\* \\`charge\\` - Charge \\* \\`plan_price\\` - Plan Price \\* \\`addon_price\\` - Addon Price\n", "enum" : [ "plan", "addon", "charge", "plan_price", "addon_price" ], "pattern" : "^\\[(plan|addon|charge|plan_price|addon_price)(,(plan|addon|charge|plan_price|addon_price))*\\]$", "example" : null }, "is" : { "type" : "string", "description" : "\\* \\`plan\\` - Plan \\* \\`addon\\` - Addon \\* \\`charge\\` - Charge \\* \\`plan_price\\` - Plan Price \\* \\`addon_price\\` - Addon Price\n", "enum" : [ "plan", "addon", "charge", "plan_price", "addon_price" ], "example" : null } } } }, { "name" : "entity_id", "in" : "query", "description" : "

optional, string filter

\n

The id\nof the entity\nto which this entitlement belongs. .\nSupported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nentity_id[in] = "usd-professional-monthly"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "usd-professional-monthly", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "entitlement" : { "$ref" : "#/components/schemas/Entitlement", "description" : "Resource object representing entitlement" } }, "required" : [ "entitlement" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "Manage entitlements for a feature", "description" : "

Create, update, or remove a set of entitlements for a feature.

The behavior depends on the specified action. It tries to create, update, or delete entitlement objects. If any of the entitlement objects fail to process, the entire operation stops with an error, and no entitlements are processed. In essence, the request processes either all the provided entitlements or none of them.

Grandfathering in entitlements

\n

Early Access

\n

Grandfathering in entitlements is in early access. Write to eap@chargebee.com to get this enabled.

\n

By default, this operation impacts all subscriptions that contain the item or item price. However, if you set apply_grandfathering to true, the existing subscriptions are not impacted by the change.

Example

Consider the following example:

On January 1st
On January 2nd
On January 3rd
", "operationId" : "upsert_or_remove_entitlements_for_a_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "action" : { "type" : "string", "deprecated" : false, "description" : "

The specific action to be performed for each entitlement\nspecified.

\n* upsert -

If the entitlement\nalready exists for the feature_id\nand entity_id\ncombination, the value\nof the entitlement\nis updated. If it doesn't exist, a new entitlement\nis created.

\n* remove -

Deletes the entitlement\nfor the feature_id\nand entity_id\ncombination, if it exists.

", "enum" : [ "upsert", "remove" ], "example" : null }, "change_reason" : { "type" : "string", "deprecated" : false, "description" : "Comments or reason for this entitlement change.\n", "maxLength" : 100, "example" : null }, "entitlements" : { "type" : "object", "deprecated" : false, "description" : "Parameters for entitlements\n", "properties" : { "entity_id" : { "type" : "array", "description" : "

The unique identifier of the entity being granted entitlement to a specific feature.

\n

Note\nIn the case of an upsert action, if the entitlement resource does not already exist, Chargebee does not validate this ID to confirm its correspondence to an existing entity. The entitlement is created regardless.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "feature_id" : { "type" : "array", "description" : "

The unique identifier of the feature to which the entity gains entitlement.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of the entity that holds this entitlement.

\n* plan -

Indicates that the entity is an item with type set to plan.

\n* addon_price -

Indicates that the entity is an item_price associated with an item with type set to addon.

\n* charge -

Indicates that the entity is an item\nwith type\nset to charge\n.

\n* addon -

Indicates that the entity is an item with type set to addon.

\n* plan_price -

Indicates that the entity is an item_price associated with an item of type plan.

", "enum" : [ "plan", "addon", "charge", "plan_price", "addon_price" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The level of entitlement that the entity has towards the feature. The possible values depend on the value of feature.type\n:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "apply_grandfathering" : { "type" : "array", "description" : "

Early Access

Grandfathering support for entitlements is in early access. Write to eap@chargebee.com to get this enabled.

\n

Determines whether to grandfather in existing subscriptions affected by this entitlement.

\n", "items" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "entity_id", "feature_id" ], "example" : null } }, "required" : [ "action" ], "example" : null }, "encoding" : { "entitlements" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "entitlement" : { "$ref" : "#/components/schemas/Entitlement", "description" : "Resource object representing entitlement" } }, "required" : [ "entitlement" ], "example" : null }, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/in_app_subscriptions/{in-app-subscription-app-id}/retrieve" : { "post" : { "summary" : "Retrieve store subscription", "description" : "

This API verifies the application id {in_app_subscription_app_id} and receipt then returns the subscription details associated with the purchase.

Path Parameter

in_app_subscription_app_id

required, string

The handle is created by Chargebee for your Apple App Store or Google Play Store app. It can be obtained from the Chargebee web app.\nThe following are instructions to obtain the value of the path parameter for the Apple App Store and Google Play Store.

    \n
  • Apple App Store: To obtain the value for {in_app_subscription_app_id}, click View Keys within the Sync Overview page of the web app and use the value of generated App ID for this parameter. See detailed steps here.
  • \n
  • Google Play Store: To obtain the value for {in_app_subscription_app_id}, click Set up notifications within the Sync Overview page of the web app and use the value of generated App ID for this parameter. See detailed steps here.
  • \n
", "operationId" : "retrieve_store_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|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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:(?:(?:[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "in-app-subscription-app-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/in-app-subscription-app-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "receipt" : { "type" : "string", "deprecated" : false, "description" : "

Apple App Store: The Base64 encoded App Store in-app purchase receipt taken from the Apple device after successful creation of the in-app purchase subscription.\nGoogle Play Store: The purchase token taken from the Android device after the successful creation of an in-app purchase subscription.

", "maxLength" : 65000, "example" : null } }, "required" : [ "receipt" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "in_app_subscriptions" : { "type" : "array", "description" : "

Array of in_app_subscription object

", "items" : { "$ref" : "#/components/schemas/InAppSubscription", "description" : "Resource object representing in_app_subscription" }, "example" : null } }, "required" : [ "in_app_subscriptions" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/in_app_subscriptions/{in-app-subscription-app-id}/import_receipt" : { "post" : { "summary" : "Import receipt", "description" : "

Verifies an Apple App Store or Google Play Store in-app purchase receipt and imports subscriptions for all historical purchases made by the customer.

Tip\nAn in_app_subscription\nis created for every unique original_transaction_id\n. Apple creates original_transaction_id\nfor every create, upgrade, or downgrade of the subscription. A receipt hardly contains more than 100 original_transaction_id\ns. If a receipt contains more than 100 original_transaction_id\ns, Chargebee creates all subscription records but this endpoint returns the first 100 records in the response.

CSV upload has a file size limitation that increases the processing time and the number of receipts. This API removes such limitations and allows you to import historical in-app subscription receipts.

Note\n: This API verifies receipt or token through Apple or Google and then processes them via Chargebee. For bulk imports, limit API calls to 6\nper minute (10\nseconds apart) to ensure successful subscription imports.

Apple App Store

This section provides details of the Import Receipt operation performed for the Apple App Store. This API processes only the historical in-app transaction receipts.

Important

    \n
  • Integrate Chargebee with your Apple App Store account using your shared secret from Apple.
  • \n
  • It is strongly recommended to use this endpoint to import historical in-app subscriptions only.
  • \n
  • You must import Apple App Store products using Chargebee's user interface before importing receipts using this API.
  • \n

Chargebee validates the receipt with Apple App Store and does the following once validation succeeds:

Subscriptions

Subscriptions are imported as follows:

    \n
  1. A subscription is imported for every unique value of the original_transaction_id in the Apple receipt.\nNote: This is not done for original_transaction_ids for which a subscription already exists in Chargebee.
  2. \n
  3. Each subscription imported has the following attributes set:\n
      \n
    • id set to original_transaction_id.
    • \n
    • start_date set to the earliest purchase_date_ms.
    • \n
    • current_term_start set to latest purchase_date_ms.
    • \n
    • current_term_end set to expires_date_ms of the same Latest_receipt_info element with the latest purchase_date_ms.
    • \n
    • item_price_id set to product_id.
    • \n
    • status set to in_trial if there is only one element of Latest_receipt_info with the original_transaction_id and the field is_trial_period is true, then consider the subscription is currently in trial. No invoices are created for this subscription.
    • \n
    \n
  4. \n

Invoices for the subscription

Invoices are imported as follows:

    \n
  1. An invoice is imported to Chargebee for every element of the array Latest_receipt_info which has is_trial_period as false.
  2. \n
  3. Each imported invoice has the subscription_id set to original_transaction_id.
  4. \n

Transactions for the invoices

A transaction is imported for each invoice with the following details:

    \n
  1. reference_number set to the transaction_id.
  2. \n
  3. payment_method set to apple_store.
  4. \n
Google Play Store

This section provides details of the Import Receipt operation performed for the Google Play Store. This API is used to process only the historical in-app purchase subscriptions.

Important

    \n
  • Integrate Chargebee with your Google Play Store account using your service account credentials JSON.
  • \n
  • It is strongly recommended to use this endpoint to import historical in-app subscriptions only.
  • \n
  • It is recommended to pass only the latest purchase token. If any other purchase token is passed instead of the latest one, there is a possibility of returning incorrect transaction details. If an expired purchase token is passed, then it returns an error.
  • \n
  • The Google purchase token is valid from subscription signup until 60 days after subscription expiration. After the token expires, an API request to Google Developers API returns an error.
  • \n

Chargebee validates the purchase token with Google Play Store and does the following once validation succeeds:

Subscriptions

    \n
  • \n

    A subscription is imported for every unique purchase token if it is not linked to an existing purchase token( linkedPurchaseToken field in SubscriptionsV2.get API Response).

    \n
  • \n
  • \n

    Each subscription imported has the following attributes set:

    \n
      \n
    • \n

      id set to a unique identifier generated by Chargebee and mapped to the token and latestOrderId of the SubscriptionPurchaseV2 object from Google response.

      \n
    • \n
    • \n

      start_date set to the earliest SubscriptionPurchaseV2.startTime.

      \n
    • \n
    • \n

      current_term_start set to latest SubscriptionPurchaseV2.startTime.

      \n
    • \n
    • \n

      current_term_end set to expiryTime of the same SubscriptionPurchaseV2 element with the latest purchase.

      \n
    • \n
    • \n

      item_price_id set to the concatenation of product[id] and priceCurrencyCode from Google.

      \n
    • \n
    • \n

      status set to in_trial if the free trial configuration is enabled in Google and the monetization.subscriptions.basePlans.offers.State is Active with a SubscriptionOfferPhase.duration, then consider the subscription is currently in trial. No invoices are created for this subscription.

      \n
    • \n
    \n
  • \n

Invoices for the subscription

Invoices are imported as follows:

    \n
  • \n

    An invoice is imported to Chargebee for every new subscription and renewal of an existing subscription using latestOrderId.

    \n
  • \n
  • \n

    Each imported invoice has the subscription_id set to a unique identifier generated by Chargebee and mapped to the token and latestOrderId.

    \n
  • \n

Transactions for the invoices

A transaction is imported for each invoice with the following details:

    \n
  • \n

    transaction.reference_number is set to the latestOrderId.

    \n
  • \n
  • \n

    transaction.payment_method is set to play_store.

    \n
  • \n

Path Parameter

{in_app_subscription_app_id}: The handle created by Chargebee for your Apple App Store or Google Play Store app. It can be obtained from the Chargebee web app.\nThe following are instructions to obtain the value of the path parameter for the Apple App Store and Google Play Store.

", "operationId" : "import_receipt", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "in-app-subscription-app-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/in-app-subscription-app-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "receipt" : { "type" : "string", "deprecated" : false, "description" : "

Apple App Store: The Base64 encoded App Store in-app purchase receipt taken from the Apple device after successful creation of the in-app purchase subscription.\nGoogle Play Store: The purchase token taken from the Android device after the successful creation of an in-app purchase subscription.

", "maxLength" : 65000, "example" : null }, "product" : { "type" : "object", "deprecated" : false, "description" : "Parameters for product\n", "properties" : { "currency_code" : { "type" : "string", "deprecated" : false, "description" : "**Apple App Store** : The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)) for the product.\n**Google Play Store** : This parameter is **not applicable** to the Google Play Store. If the value is passed, it will return a validation error.\n", "maxLength" : 3, "example" : null } }, "required" : [ "currency_code" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Apple App Store: The unique id in Chargebee for the customer who made this purchase. If not provided, the value is considered to be original_transaction_id (the transaction identifier at Apple, of the original purchase). If the customer record is not found in Chargebee, it is created.\nGoogle Play Store: The unique id of the customer who made this purchase via Google Play Store. This unique id will be used as customer ID within Chargebee. If not provided, subscription_id (random unique id) will be the customer ID. If the customer ID already exists in Chargebee then subscription will be associated with this customer ID.

", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "**Apple App Store** : The email ID of the customer who made this purchase.\n**Google Play Store**: The email ID of the customer who made this purchase.\n", "maxLength" : 70, "example" : null } }, "example" : null } }, "required" : [ "receipt" ], "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "product" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "in_app_subscriptions" : { "type" : "array", "description" : "

Array of in_app_subscription object

", "items" : { "$ref" : "#/components/schemas/InAppSubscription", "description" : "Resource object representing in_app_subscription" }, "example" : null } }, "required" : [ "in_app_subscriptions" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/in_app_subscriptions/{in-app-subscription-app-id}/import_subscription" : { "post" : { "summary" : "Import subscription without receipt", "description" : "

The Import Subscriptions endpoint is a Chargebee API that allows you to import historic In-App Subscriptions without using a valid Apple App Store receipt. This endpoint is useful if you do not have access to the receipt data which is required for the Import Receipt API.\nWith this API, you can import subscriptions and corresponding invoices for historic In-App purchases. The API returns the in-app-subscriptions object once the historic subscription is successfully imported into Chargebee.

Note:

Apple App Store

This section provides details of the Import Subscription operation when performed for the Apple App Store. This API creates a historic subscription if the incoming subscription is unknown. For a known subscription, it creates an invoice for the mentioned period.

Important

Chargebee validates the application ID with Apple App Store and does the following once validation succeeds:

Subscription

    \n
  1. \n

    Import the subscription from the latest_receipt_info array from Apple and a new subscription is imported for the item-price.\nNote: The subscription is not imported if it already exists in Chargebee but we will import the associated invoice using the subscription[transaction_id] in the payload.

    \n
  2. \n
  3. \n

    Each subscription imported has the following attribute set:

    \n
      \n
    • \n

      id set to subscription[id] . This subscription[id] is original_transaction_id in the receipts.

      \n
    • \n
    • \n

      start_date set to subscription[start_date]. You need to provide this information from the oldest Latest_receipt_info.purchase_date_ms.

      \n
    • \n
    • \n

      term_start set to subscription[term_start]. You need to provide this information from the oldest Latest_receipt_info.purchase_date_ms).

      \n
    • \n
    • \n

      term_end set to subscription[term_end]. You need to provide this information from the oldest Latest_receipt_info.expires_date_ms.

      \n
    • \n
    • \n

      item_price_id set to subscription[product_id] + subscription[currency_code]. You need to provide this information from the Latest_receipt_info.product_id.

      \n
    • \n
    • \n

      Chargebee records the subscription in a Trial state if the is_trial_period is true.

      \n
    • \n
    • \n

      Chargebee records the subscription in a Canceled state if the term_end is less than the System.currentTime().

      \n
    • \n
    \n
  4. \n

Invoice for the subscription

    \n
  1. The payment is recorded against the subscription invoice.
  2. \n
    \n
  1. The associated transaction is updated with the following details:
  2. \n

Path Parameter

in_app_subscription_app_id

required, string

The handle created by Chargebee for your App Store app. It can be obtained from within the Chargebee web app. To obtain the value of in_app_subscription_app_id for the Apple App Store, click View Keys within the Sync Overview page of the web app, and use the value of generated App ID for this parameter. See detailed steps here.

", "operationId" : "import_subscription_without_receipt", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "in-app-subscription-app-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/in-app-subscription-app-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

This parameter is known as original_transaction_id in Apple App Store. You can get the value of original_transaction_id from the latest_receipt_info. The latest_receipt_info is an array that contains all in-app purchase transactions.

", "maxLength" : 50, "example" : null }, "started_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which the subscription has started or going to be started. You can find this value from the oldest purchase_date_ms.

", "example" : null }, "term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Start date of the billing period for the subscription. You can find it from the purchase_date_ms field in receipt payload.

", "example" : null }, "term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

End date of the billing period for the subscription. You can find it from the expires_date_ms field in receipt payload.

", "example" : null }, "product_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the product as configured in App Store Connect.\n", "maxLength" : 96, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) for the product.\n", "maxLength" : 3, "example" : null }, "transaction_id" : { "type" : "string", "deprecated" : false, "description" : "

Transaction ID value as mentioned in the latest_receipt_info.\nThis must be unique across subscriptions.

", "maxLength" : 43, "example" : null }, "is_trial" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Indicates if the subscription is in trial for the term start and term end. The default value is false\n.

", "example" : null } }, "required" : [ "currency_code", "id", "product_id", "started_at", "term_end", "term_start", "transaction_id" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id in Chargebee for the customer who made this purchase. If not provided, the value is considered to be original_transaction_id (the transaction identifier at Apple, of the original purchase.). If the customer record is not found in Chargebee, it is created.

", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email ID of the customer who made this purchase.\n", "maxLength" : 70, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "in_app_subscription" : { "$ref" : "#/components/schemas/InAppSubscription", "description" : "

Resource object representing in_app_subscription

" } }, "required" : [ "in_app_subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/in_app_subscriptions/{in-app-subscription-app-id}/process_purchase_command" : { "post" : { "summary" : "Process purchase command", "description" : "

Verifies an in-app purchase made by your customer and creates a subscription in Chargebee.

Note:\nIf App Store or Play Store products have not been imported to Chargebee and this API is invoked, Chargebee will automatically create plans that correspond to the store product IDs. However, if historical subscriptions are to be imported using the import receipt API, importing products is mandatory. Learn more.

Apple App Store

This section provides details of the Process Purchase Command operation when performed for the Apple App Store. This API processes only the latest in-app transaction on the receipt. Sync historical subscriptions into Chargebee using bulk import of In-App Purchase receipts.

Important

    \n
  • Integrate Chargebee with your Apple App Store account using your shared secret from Apple.
  • \n
  • It is strongly recommended to use this endpoint to notify Chargebee of new purchases only.
  • \n
  • For updates to existing subscriptions, we recommend that you configure Apple App Store to send server notifications to Chargebee.
  • \n

Chargebee validates the receipt with Apple App Store and does the following once validation succeeds:

    \n
  1. Look for item_family.id that matches the value Apple-App-Store, and create such a product family if not found.
  2. \n
  3. Look for item.id that matches product[id] and if not found, create such a plan-item under the item family described in the previous step.
  4. \n
  5. Look for item_price.id that matches the concatenation of product[id] and product[currency_code], and if not found, create such an item price under the item described in the previous step.
  6. \n
  7. Create/update a subscription:
  8. \n
    \n
  • \n

    If the receipt is for a new purchase, a new subscription is created for the plan-item price described in the previous step. The subscription has the following details:

    \n
  • \n
  • \n

    id set to original_transaction_id

    \n
  • \n
  • \n

    start_date set to responseBody.Latest_receipt_info.purchase_date_ms

    \n
  • \n
  • \n

    current_term_end set to responseBody.Latest_receipt_info.expires_date_ms

    \n
  • \n
  • \n

    Instead, if the receipt belongs to an existing subscription in Chargebee, it is updated to reflect the current state of the subscription at Apple.

    \n
  • \n
    \n
  1. The payment is recorded against the subscription invoice. The associated transaction is updated with the following details:
  2. \n
Google Play Store

This section provides details of the Process Purchase Command operation when performed for the Google Play Store. This API processes only the latest in-app transaction using the purchase token.

Important

    \n
  • Integrate Chargebee with your Google Play Store account using the service account credentials JSON.
  • \n
  • It is strongly recommended to use this endpoint to notify Chargebee of new purchases only.
  • \n
  • For updates to existing subscriptions, we recommend that you configure Chargebee to receive Google's server notifications through pub/sub topic. Learn more.
  • \n

Chargebee validates the purchase token with Google Play Store and does the following once validation succeeds:

    \n
  1. Look for item_family.id that matches the value Google-Play-Store, and create such a product family if not found.
  2. \n
  3. Look for item.id that matches product[id] and if not found, create such a plan-item under the item family described in the previous step.
  4. \n
  5. Look for item_price.id that matches the concatenation of product[id] and priceCurrencyCode, and if not found, create such an item price under the item described in the previous step.
  6. \n
  7. Create/update a subscription:
  8. \n
    \n
  • \n

    If this token is for a new purchase, a new subscription is created for the plan-item price described in the previous step. The subscription has the following details:

    \n
  • \n
  • \n

    id set to unique identifier generated by Chargebee and mapped to token of the SubscriptionPurchase object from Google response.

    \n
  • \n
  • \n

    start_date set to SubscriptionPurchase.startTimeMillis.

    \n
  • \n
  • \n

    current_term_end set to SubscriptionPurchase.expiryTimeMillis.

    \n
  • \n
  • \n

    Instead, if the token belongs to an existing subscription in Chargebee, it is updated to reflect the current state of the subscription at Google.

    \n
  • \n
    \n
  1. The payment is recorded against the subscription invoice. The associated transaction is updated with the following details:
  2. \n

Path Parameter

{in_app_subscription_app_id}: The handle created by Chargebee for your Apple App Store or Google Play Store app. It can be obtained from the Chargebee web app.

The following are instructions to obtain the value of the path parameter for the Apple App Store and Google Play Store.

", "operationId" : "process_purchase_command", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "in-app-subscription-app-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/in-app-subscription-app-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "receipt" : { "type" : "string", "deprecated" : false, "description" : "

Apple App Store: The Base64 encoded App Store in-app purchase receipt taken from the Apple device after successful creation of the in-app purchase subscription.\nGoogle Play Store: The purchase token taken from the Android device after the successful creation of an in-app purchase subscription.

", "maxLength" : 65000, "example" : null }, "product" : { "type" : "object", "deprecated" : false, "description" : "Parameters for product\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThe unique identifier of the product purchased. The value of this parameter is the productId\n/subscriptionId\nor sku\nreceived from the Google Play Store.

\n

Note:\nThe max chars\nlimit is 95\nfor Google Play Store.

\n

Apple App Store:\nThe unique identifier\n(created in App Store Connect\n) of the product purchased.

", "maxLength" : 96, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "**Google Play Store** :\nThis parameter is **not applicable**\nto the Google Play Store. If the value is passed, it will return a validation error.\n\n**Apple App Store**:\nThe currency code (ISO 4217 format) for the product.\n", "maxLength" : 3, "example" : null }, "price" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Google Play Store:\nThis parameter is not applicable\nto the Google Play Store. If the value is passed, it will return a validation error.

\n

Apple App Store:\nThe price paid by the customer for this product. The unit depends on the type of currency.\nProvide either this or product[price_in_decimal]\n.

\n

Note:

", "minimum" : 0, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThe name (created in Play Store Console\n) of the product purchased. If not passed then the product[id]\nwill be considered as the value of product[name]\n.

\n

optional, string, max chars=46

\n

Apple App Store:\nThe name (created in App Store Connect\n) of the product purchased.

", "maxLength" : 46, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThis parameter is not applicable\nto the Google Play Store. If the value is passed, it will return a validation error.

\n

Apple App Store:\nThe price paid by the customer for the product. The value is in decimal and in major units of the currency. Provide either this or product[price]\n.

", "maxLength" : 39, "example" : null }, "period" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThis parameter is not applicable\nto the Google Play Store. If the value is passed, it will return a validation error.

\n

Apple App Store:\nThis is the renewal period of the subscription. For example, 1, 2, 3, and so on. This is an optional\nparameter. The parameter value is required\nif the product(s) are not imported to Chargebee from Apple App Store.

", "maxLength" : 3, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThis parameter is not applicable\nto the Google Play Store. If the value is passed, it will return a validation error.

\n

Apple App Store:\nThis is the unit of the renewal period. For example, 0\nrepresents the day\n,1\nrepresents the week\n, 2\nrepresents the month\n, and 3\nrepresents the year.\nThis is an optional\nparameter. The parameter value is required\nif the product(s) are not imported to Chargebee from Apple App Store.

\n

Note\nSince the Apple App Store receipt does not have the subscription renewal period information for trial subscriptions, product[period] and product[period_unit] are needed, to create a subscription in Chargebee with the trial period. If these parameters are not passed and the receipt has trial information then Chargebee will return a validation error.

", "maxLength" : 3, "example" : null } }, "required" : [ "currency_code", "id", "price" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThe unique id\nin Chargebee for the customer who made this purchase via Google Play Store. If not provided, subscription_id\n(random unique id) will be the customer[id].\nIf the customer record is not found in Chargebee, it is created.

\n

optional, string, max chars=50

\n

Apple App Store:\nThe unique id\nin Chargebee for the customer who made this purchase. If not provided, the value is considered to be original_transaction_id\n(the transaction identifier at Apple, of the original purchase). If the customer record is not found in Chargebee, it is created.

", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address of the customer who made the purchase.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the customer who made the purchase.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the customer who made the purchase.\n", "maxLength" : 150, "example" : null } }, "example" : null } }, "required" : [ "receipt" ], "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "product" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "in_app_subscription" : { "$ref" : "#/components/schemas/InAppSubscription", "description" : "

Resource object representing in_app_subscription

" } }, "required" : [ "in_app_subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/non_subscriptions/{non-subscription-app-id}/one_time_purchase" : { "post" : { "summary" : "One time purchase", "description" : "This API is used to sync consumable, non-consumable, and non-renewing product payments in Chargebee.\n", "operationId" : "one_time_purchase", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "non-subscription-app-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/non-subscription-app-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "receipt" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThe purchase token\ntaken from the Android device after successful creation of the in-app purchase.

\n

Apple App Store:\nThe Base64 encoded App Store in-app purchase receipt\ntaken from the Apple device after successful creation of the in-app purchase.

", "maxLength" : 65000, "example" : null }, "product" : { "type" : "object", "deprecated" : false, "description" : "Parameters for product\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store: The unique identifier of the product purchased. The value of this parameter is the productId or sku received from the Google Play Store.

\n

Note:\nThe max chars\nlimit is 95\nfor the Google Play Store.

\n

Apple App Store: The unique identifier (created in App Store Connect) of the product purchased.

", "maxLength" : 96, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "**Google Play Store** :\nThis parameter is **not applicable**\nto the **Google Play Store**.\nIf the value is passed, it will return a validation error.\n\n**Apple App Store**:\nThe currency code (ISO 4217 format) for the product.\n", "maxLength" : 3, "example" : null }, "price" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Google Play Store:\nThis parameter is not applicable\nto the Google Play Store.\nIf the value is passed, it will return a validation error.

\n

Apple App Store:\nThe price paid by the customer for this product. The unit depends on the type of currency.\nProvide either this or product[price_in_decimal]\n.

", "minimum" : 0, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The type of product for one time purchase.\n\\* consumable -\n\nThis value represents a type of one-time purchase that provides users with in-app benefits or effects that can be consumed or depleted over time, such as lives, gems, boosts, or digital tips. Once consumed, the purchased item is no longer available and must be repurchased to obtain its benefits again.\n\\* non_consumable -\n\nThe value represents a type of in-app purchase that provides a permanent benefit to the user and can be purchased once without expiration. This type of purchase is typically used to offer premium features or content that enhance the user experience of the app, such as additional filters or cosmetic items in a game.\n\\* non_renewing_subscription -\n\nThe value represents a type of subscription that grants access to services or content for a limited period of time, such as a season pass to in-game content. Unlike other subscription models, this type of subscription does not renew automatically and requires people to purchase a new subscription once it concludes to continue accessing the content or services.\n", "enum" : [ "consumable", "non_consumable", "non_renewing_subscription" ], "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThe name (created in Play Store Console\n) of the product purchased. If not passed then the product[id]\nwill be considered as the value of product[name].

\n

Apple App Store:\nThe name (created in App Store Connect\n) of the product purchased.

", "maxLength" : 96, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThis parameter is not applicable to the Google Play Store. If the value is passed, it will return a validation error.

\n

Apple App Store: The price paid by the customer for the product. The value is in decimal and in major units of the currency. Provide either this or product[price].

", "maxLength" : 39, "example" : null } }, "required" : [ "currency_code", "id", "price", "type" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Google Play Store:\nThe unique id\nin Chargebee for the customer who made this purchase via Google Play Store. If not provided, a random unique ID generated for the purchase token will be the customer[id].\nIf the customer record is not found in Chargebee, it is created.

\n

Apple App Store:\nThe unique id\nin Chargebee for the customer who made this purchase. If not provided, the value is considered to be original_transaction_id\n(the transaction identifier at Apple, of the original purchase). If the customer record is not found in Chargebee, it is created.

", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address of the customer who made the purchase.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the customer who made the purchase.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the customer who made the purchase.\n", "maxLength" : 150, "example" : null } }, "example" : null } }, "required" : [ "receipt" ], "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "product" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "non_subscription" : { "$ref" : "#/components/schemas/NonSubscription", "description" : "

Resource object representing non_subscription

" } }, "required" : [ "non_subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/entitlement_overrides" : { "get" : { "summary" : "List entitlement overrides for a subscription", "description" : "Retrieve the list of entitlement overrides for a subscription.\n", "operationId" : "list_entitlement_overrides_for_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "entitlement_override" : { "$ref" : "#/components/schemas/EntitlementOverride", "description" : "Resource object representing entitlement_override" } }, "required" : [ "entitlement_override" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "Upsert or remove entitlement overrides for a subscription", "description" : "

Upserts or removes a set of entitlement_overrides\nfor a subscription\ndepending on the action\nspecified. The API returns the upserted or deleted entitlement_overrides\nafter successfully completing the operation. The operation returns an error when the first entitlement_override\nfails to be processed. Either all the entitlement_overrides\nprovided in the request are processed or none.

", "operationId" : "upsert_or_remove_entitlement_overrides_for_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "action" : { "type" : "string", "deprecated" : false, "description" : "

The action to perform for each entitlement_override specified in the entitlement_overrides array.

\n* upsert -

If the entitlement_override for the subscription_id, feature_id, and entity_id combination already exists, the value of the entitlement_override is updated. If it doesn't exist, a new entitlement_override is created.

\n* remove -

Deletes the entitlement_override for the subscription_id, feature_id, and entity_id combination, if it exists.

", "enum" : [ "upsert", "remove" ], "example" : null }, "entitlement_overrides" : { "type" : "object", "deprecated" : false, "description" : "Parameters for entitlement_overrides.\n", "properties" : { "feature_id" : { "type" : "array", "description" : "

The id of the feature for which the entitlement override is being set.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "

The id of the entity at whose level the entitlement override is being set for the subscription. If the entity_id is not currently a part of the subscription, the entitlement_override takes effect as soon as the entity is added to the subscription.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The type of the entity at whose level the entitlement override is being set for the subscription.

\n* plan_price -

Indicates that the entity is an item_price with item_type set to plan.

\n* charge -

Indicates that the entity is an item with type set to charge.

\n* addon_price -

Indicates that the entity is an item_price with item_type set to addon.

", "enum" : [ "plan_price", "addon_price", "charge" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "expires_at" : { "type" : "array", "description" : "

The expiry date for the entitlement_override. The entitlement_override object is no longer returned after this date has passed.

\n

Constraints

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "effective_from" : { "type" : "array", "description" : "

The starting date and time for the entitlement override. It indicates when the override becomes effective.

\n

Constraints

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "is_enabled" : { "type" : "array", "description" : "", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "feature_id" ], "example" : null } }, "example" : null }, "encoding" : { "entitlement_overrides" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "entitlement_override" : { "$ref" : "#/components/schemas/EntitlementOverride", "description" : "Resource object representing entitlement_override" } }, "required" : [ "entitlement_override" ], "example" : null }, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/business_entities/transfers" : { "get" : { "summary" : "List business entity transfers", "description" : "

Returns a list of business_entity_transfer resources meeting all the conditions specified in the filter parameters below. By default, this list is sorted by created_at in descending order (latest first).

Tip

To retrieve a history of all the business entity transfers for a resource, pass the filter parameters active_resource_id[is] and resource_type[].

", "operationId" : "list_the_business_entity_transfers", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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}(?:(?: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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "resource_type", "in" : "query", "description" : "

Filter business_entity_transfer resources based on resource_type.

\n

Tip\nUse this filter along with active_resource_id[is] to retrieve the history of all the business entity transfers for a resource.

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "customer", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "resource_id", "in" : "query", "description" : "

Filter business_entity_transfer\nresources based on resource_id\n.

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "9bsvnHgsvmsI", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "active_resource_id", "in" : "query", "description" : "

Filter business_entity_transfer resources based on active_resource_id.

\n

Tip\nUse this filter along with resource_type[] to retrieve the history of all the business entity transfers for a resource.

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on Created At.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[on\\] = \"1702022464\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1702022464", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "business_entity_transfer" : { "$ref" : "#/components/schemas/BusinessEntityTransfer", "description" : "Resource object representing business_entity_transfer" } }, "required" : [ "business_entity_transfer" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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" : "Transfer a customer to another business entity", "description" : "

Important\nThis API will not work if you have specified a business entity in the custom HTTP header.

Transfers one or more customer resources from one business entity to another.

The transfer is executed by creating a copy of the customer resource. The original resource is deprecated, while the new copy becomes the active resource.

More details

Prerequisites

    \n
  • \n

    Transfers must always be initiated for an active customer resources and never for a deprecated resources.

    \n
  • \n
  • \n

    A customer resource cannot be transferred more than three times in a single calendar year. For example, if already moved thrice in the year 2023, a customer resource can only be moved again in 2024.

    \n
  • \n
  • \n

    The customer resource must not have any of the following:

    \n\n
  • \n
  • \n

    The customer resource must not be a gifter of a gift subscription with status scheduled or unclaimed.

    \n
  • \n

Mechanics of business entity transfer

When calling this endpoint, the active and deprecated resources are processed as follows:

    \n
  1. \n

    For the active resource:

    \n
      \n
    1. id and active_id are set to match the deprecated resource's id.
    2. \n
    3. business_entity_id is set to destination_business_entity_id parameter.
    4. \n
    \n
  2. \n
  3. \n

    For the deprecated resource:

    \n
      \n
    1. For customer and subscription resources, the value of active_id is set to match the resource id.
    2. \n
    3. The value of id is changed to a new random value.
    4. \n
    \n
  4. \n

Considerations for business entity transfer

    \n
  • \n

    When this API is endpoint is called, Chargebee blocks concurrent calls to incompatible POST operations.

    \n
  • \n
  • \n

    When a resource is transferred more than once, each transfer deprecates the previous active resource and creates a new active resource.

    \n
  • \n
  • \n

    payment_source resources linked to the customer are immediately transferred to the destination business entity.

    \n
  • \n
  • \n

    subscription resources linked to the customer are transferred automatically to the destination business entity as follows:

    \n
      \n
    • active subscription resources are transferred on their next renewal.
    • \n
    • paused subscription resources are transferred when resumed.
    • \n
    • future subscription resources are transferred on their start_date.
    • \n
    • non_renewing and cancelled subscription resources are not transferred and remain linked to the deprecated customer resource.
    • \n
    \n
  • \n
  • \n

    Other resources linked to the customer, such as invoice, quote, credit_note, and transaction, remain linked to the deprecated customer resource.

    \n
  • \n
  • \n

    Deprecated customer and subscription resources are not returned in list APIs such as List customers or List subscriptions.

    \n
  • \n

See also

Example

The following example illustrates the transfer of a customer resource from a business entity (source) to another (destination). The example also shows how payment_source, subscription, and invoice resources attached to the customer resource are affected.

1. Initial state before the transfer

Imagine a customer\nresource with the id\nAb6dRFt\nbelonging to the business entity acme-us\n. This customer has a linked payment_source\n, subscription\n, and an invoice\n.

screenshot|/images/transfer_resource_1.jpg
2. Invoking the API endpoint

To transfer the customer resource to a new business entity acme-eu, you would call the endpoint as follows:

\ncurl  https://{site}.chargebee.com/api/v2/business_entities/transfers \\\n-u {api_key}:\\\n-d active_resource_ids[0]="Ab6dRFt" \\\n-d destination_business_entity_ids[0]="acme-us" \\\n-d reason_code[0]="correction"\n    \n

The customer resource is deprecated in favor of a new active customer resource. Notice that the id of the deprecated customer resource is transferred to the new, active customer resource. Meanwhile, the deprecated resource is assigned a new random id.

The payment_source resource is also deprecated and a new active payment_source resource is created and linked to the new customer resource. Here too, the active resource adopts the id of the deprecated payment_source, which in turn is assigned a new random id.

The subscription and invoice resources remain linked to the deprecated customer resource.

screenshot|/images/transfer_resource_2.jpg
3. Transfer of linked subscription resources

When the subscription renews, it automatically transfers to the business entity of the active customer resource. This process mirrors the transfer of the customer resource, resulting in a new active subscription resource linked to the active customer resource and the business entity acme-eu.

screenshot|/images/transfer_resource_3.jpg
", "operationId" : "transfer_resources_to_another_business_entity", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "active_resource_ids" : { "type" : "array", "deprecated" : false, "description" : "

The list of unique identifiers of the customer resources to be transferred. Each id must belong to an active customer resource.

\n

Note\nIf a customer resource was deprecated because it was moved previously, you cannot move it again. Instead, move the active version of the resource. Do this by passing the active_id of the deprecated resource.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "destination_business_entity_ids" : { "type" : "array", "deprecated" : false, "description" : "

The list of unique identifiers of the business_entity resources to which the corresponding customer resource must be transferred.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "reason_codes" : { "type" : "array", "deprecated" : false, "description" : "

The list of reasons\nfor changing the business entity of the corresponding customer\nresources.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "active_resource_ids", "destination_business_entity_ids", "reason_codes" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "business_entity_transfer" : { "$ref" : "#/components/schemas/BusinessEntityTransfer", "description" : "

Resource object representing business_entity_transfer\n.

" } }, "required" : [ "business_entity_transfer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/purchases" : { "post" : { "summary" : "Create a purchase", "description" : "

Deprecated\nThe purchase resource and its associated operations on this page are deprecated. Avoid using them in your integrations. The ability to purchase multiple plans in a single subscription will be supported through the Subscriptions API in the future.

Creates a purchase resource. A purchase can contain one or more of the following:

When you call this API, the invoices for the subscription(s) and one-time charge(s) are created immediately and not left unbilled\n.

Note

Providing shipping_addresses[] is required when the Orders feature has been enabled.

Specifying purchase_item groups

When creating a purchase, you must specify the group or index to which each item price belongs. You can do this by setting the purchase_items[index] for each item price. Item prices with the same purchase_items[index] belong to the same group.\nThe grouping of item prices allows you to specify the discounts[] applicable for each group and indicate which item prices should be added to any subscriptions you want to create. Groups can be one of two types:

The following subsections describe the types of groups in detail.

Note

You can specify up to 10 groups,

The total limit for group items for a single purchase is 60.

Subscription groups

To create a subscription, specify a subscription group. A subscription group is a group of item prices that contains exactly one item price of type plan. To create multiple subscriptions, provide multiple subscription groups.

Note

A subscription group can have up to 20 non-plan item prices. To increase this limit to a maximum of 60, contact eap@chargebee.com.

Custom Fields

Purchase API supports custom fields of Subscriptions, use the following format to specify custom fields in Purchase API: subscription_info[custom_field].

One-time charge groups

A one-time charge group is a group of charge item prices (i.e. item prices belonging to items of type charge). Charge item prices can be added to subscription groups as well. The charges within and across each one-time group must be unique.

Note

Applying discounts

Discounts, both manual discounts and coupons, can be applied to groups by specifying the discounts[] array. The following table describes the method of application based on whether discounts[index][i] is provided:

discounts[index][i] is provideddiscounts[index][i] is not provided
Coupons
    \n
  • The coupon is applied exclusively to the invoice for group i.
  • \n
  • The coupon is applied exclusively to the invoice created immediately upon invoking this API.
  • \n
  • If group i is a subscription group, then the coupon is applied to invoices for subscription renewals based on coupon attributes such as duration_type and max_redemptions.
  • \n
    \n
  • The coupon is applied to all the invoices immediately generated upon invoking this API.
  • \n
  • The coupon is not applied to subsequent invoices, such as those generated upon subscription renewal.
  • \n
Manual discounts
    \n
  • The manual discount is applied exclusively to the invoice for group i.
  • \n
  • The manual discount is applied exclusively to the invoice created immediately upon invoking this API.
  • \n
  • The manual discount is not applied to subsequent invoices, such as those generated upon subscription renewal.
  • \n
    \n
  • The manual discount is applied to all the invoices immediately generated upon invoking this API.
  • \n
  • The manual discount is not applied to subsequent invoices, such as those generated upon subscription renewal.
  • \n
", "operationId" : "create_a_purchase", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example"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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [customer](/docs/api/customers)\nthat made this purchase.\n", "maxLength" : 50, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source attached to this purchase. If present, the customer's payment sources won't be used to collect any payment for this purchase.\n", "maxLength" : 40, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "

Indicates whether the primary payment source is replaced with this payment source. If a payment_intent\nobject is included in the request, replace_primary\ndefaults to true.\nFor all other cases, the default is false\n.

", "example" : null }, "invoice_info" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice_info\n", "properties" : { "po_number" : { "type" : "string", "deprecated" : false, "description" : "The [purchase order number](https://www.chargebee.com/docs/2.0/po-number.html)\nfor this purchase. This is reflected in all the subscriptions and invoices under this purchase.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to the PDF of the first invoice associated with this purchase. This is added to [invoice.notes](/docs/api/invoices/invoice-object#notes).\nSubsequent invoices do not have this note.\n", "maxLength" : 2000, "example" : null } }, "example" : null }, "payment_schedule" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for payment_schedule

", "properties" : { "scheme_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the payment_schedule_scheme\n, used to create the payment schedules.

\n", "maxLength" : 40, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The part of the invoice.amount_due\nto be distributed across the payment schedules. If not specified, the entire invoice.amount_due\nis considered by default.

\n", "minimum" : 0, "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Parameters for statement_descriptor\n", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment transaction descriptor text to help your customer easily recognize the transaction. When you pass this value it will override the [transaction descriptor](https://www.chargebee.com/docs/2.0/transaction_descriptors.html)\ntext configured on your Chargebee site for the first [consolidated invoice](https://www.chargebee.com/docs/2.0/consolidated-invoicing.html)\n.\n", "maxLength" : 65000, "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "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.\n\\* card -\n\nCard based payment including credit cards and debit cards.\n\\* swish -\n\nSwish\n\\* twint -\n\nTwint\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* faster_payments -\n\nFaster Payments\n\\* upi -\n\nUPI Payments.\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* klarna -\n\nKlarna\n\\* payme -\n\nPayMe\n\\* go_pay -\n\nGo Pay\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* trustly -\n\nTrustly\n\\* naver_pay -\n\nNaver Pay\n\\* stablecoin -\n\nStablecoin\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* pix -\n\nPayments made via Pix\n\\* venmo -\n\nVenmo\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* alipay -\n\nAlipay\n\\* tamara -\n\nPayments made via Tamara.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* pay_to -\n\nPayTo\n\\* boleto -\n\nPayments made via Boleto.\n\\* pay_co -\n\nPay Co\n\\* wechat_pay -\n\nWeChat Pay\n\\* cash_app_pay -\n\nCash App Pay\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* after_pay -\n\nAfter Pay\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* grab_pay -\n\nGrab Pay\n\\* paypay -\n\nPayPay\n\\* payconiq_by_bancontact -\n\nPayconiq by Bancontact\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* direct_debit -\n\nPayments made via Direct Debit.\n\\* sepa_instant_transfer -\n\nSepa Instant Transfer\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* pay_by_bank -\n\nPay By Bank\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* qpay -\n\nPayments made via Qpay.\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* gcash -\n\nPayments made via GCash.\n\\* giropay -\n\nPayments made via giropay.\n\\* sofort -\n\nPayments made via Sofort.\n\\* amazon_payments -\n\nAmazon Payments\n\\* kakao_pay -\n\nKakao Pay\n\\* dana -\n\nPayments made via Dana.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* revolut_pay -\n\nRevolut Pay\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "purchase_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for purchase_items\n", "properties" : { "index" : { "type" : "array", "description" : "The index or identifier of the [group](/docs/api/purchases)\nto which the item price belongs. The item prices assigned the same index belong to the same group.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "The unique identifier of the [item price](/docs/api/item_prices)\nto be added to the [group](/docs/api/purchases)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "

The quantity of the item price. Applicable only when the pricing model\nof the item price is anything other than flat_fee.\nYou can provide this value whether multi-decimal pricing\nis enabled or disabled.

", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "The price or per unit price of the item. You may provide this only when [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis enabled for the site.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount_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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity of the item purchased. By default multi-decimal pricing\nis enabled for purchase API, it is recommended to use the purchase_items[quantity_in_decimal][0..n]\nfor providing quantity-based item prices when multi-decimal pricing is enabled. When multi-decimal pricing is disabled provide the value in purchase_items[quantity][0..n]\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null } }, "required" : [ "index", "item_price_id" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "index" : { "type" : "array", "description" : "

The index or identifier of the group\nto which this tier information belongs. This must be a value from the purchase_items[index]\narray.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The unique ID of the item price to which this tier information belongs. This must be a value from the purchase_items[item_price_id]\narray.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "

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\nof the very next lower tier.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "

The highest value of quantity in this tier. For all other tiers,it must be equal to the starting_unit_in_decimal\nof the very next higher tier.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the total price of the item. The currency units in which this value is expressed depends\non the type of currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "required" : [ "index" ], "example" : null }, "shipping_addresses" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_addresses\n", "properties" : { "first_name" : { "type" : "array", "description" : "

The first name of the contact. This parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "last_name" : { "type" : "array", "description" : "

The last name of the contact. This parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "email" : { "type" : "array", "description" : "The email address.\n", "items" : { "type" : "string", "format" : "email", "deprecated" : false, "maxLength" : 70, "example" : null }, "example" : null }, "company" : { "type" : "array", "description" : "The company name.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "phone" : { "type" : "array", "description" : "The phone number.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "line1" : { "type" : "array", "description" : "

Address line 1. This parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "line2" : { "type" : "array", "description" : "Address line 2\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "line3" : { "type" : "array", "description" : "Address line 3\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "city" : { "type" : "array", "description" : "

The name of the city. This parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "state" : { "type" : "array", "description" : "The state/province name.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "state_code" : { "type" : "array", "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "country" : { "type" : "array", "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.\nThis parameter is mandatory\nwhen providing shipping information.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "zip" : { "type" : "array", "description" : "

Zip or postal code. The number of characters is validated according to the rules specified here.\nThis parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 20, "example" : null }, "example" : null }, "validation_status" : { "type" : "array", "items" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* valid -\n\nAddress was validated successfully.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null }, "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "index" : { "type" : "array", "description" : "

The index or identifier of the group\nto which this discount or coupon information belongs. This must be a value from the purchase_items[index] array. When not provided, the coupon is applied to the first invoice only; irrespective of the values set for coupon.duration_typeor coupon.max_redemptions.

\n

See also:

Applying discounts
", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "coupon_id" : { "type" : "array", "description" : "The unique ID of a coupon to be applied to the group. Alternatively, you may provide a [coupon code](/docs/api/coupon_codes). Applicable only for [coupons](/docs/api/coupons). \n**See also:**\n[Applying discounts](/docs/api/purchases)\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "

The percentage of the discount. Applicable only for manual discounts. For any given array index i, provide discounts[percentage][i] or discounts[quantity][i] or discounts[amount][i]

\n

See also:

Applying discounts
", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "

The discount quantity. Applicable only for manual discounts. For any given array index i, provide discounts[percentage][i] or discounts[quantity][i] or discounts[amount][i]

\n

See also:

Applying discounts
", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "

The absolute value of the discount. The currency units in which this value is expressed depends on the type of currency. Applicable only for manual discounts.\nFor any given array index i, you can provide discounts[percentage][i] or discounts[quantity][i] or discounts[amount][i]

\n

See also:

Applying discounts
", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

For manual discounts, set this to false if this manual discount should be excluded from monthly recurring revenue (MRR) calculations for the site. The following prerequisites must be met to allow this parameter to be passed:

\n\n

See also:\nApplying discounts

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "subscription_info" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_info\n", "properties" : { "index" : { "type" : "array", "description" : "

The index or identifier of the group\nto which this subscription information belongs. This must be a value from the purchase_items[index]\narray and the group must be a subscription group\n.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "subscription_id" : { "type" : "array", "description" : "When specifying a [subscription group](/docs/api/purchases)\n, this is the unique identifier of the [subscription](/docs/api/subscriptions)\nto be created. This value must be unique for each subscription group.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "array", "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 100, "minimum" : 1, "example" : null }, "example" : null }, "meta_data" : { "type" : "array", "description" : "A collection of key-value pairs that provides extra information about the purchase. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/advanced-features)\n.\n", "items" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "index" ], "example" : null }, "contract_terms" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_terms\n", "properties" : { "index" : { "type" : "array", "description" : "

The index number of the subscription/one-time group to which the item price is added. Provide a unique number between 0\nand 9\n(inclusive) for each group that is to be created. To increase this limit, contact Chargebee Support

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "action_at_term_end" : { "type" : "array", "items" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* renew - \n* 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.

\n\n* evergreen -

Contract term completes and the subscription renews.

\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "example" : null }, "cancellation_cutoff_period" : { "type" : "array", "description" : "

The number of days before contract_end\n, 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.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "index" ], "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "contract_terms" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "invoice_info" : { "style" : "deepObject", "explode" : true }, "item_tiers" : { "style" : "deepObject", "explode" : true }, "payment_intent" : { "style" : "deepObject", "explode" : true }, "payment_schedule" : { "style" : "deepObject", "explode" : true }, "purchase_items" : { "style" : "deepObject", "explode" : true }, "shipping_addresses" : { "style" : "deepObject", "explode" : true }, "statement_descriptor" : { "style" : "deepObject", "explode" : true }, "subscription_info" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "purchase" : { "$ref" : "#/components/schemas/Purchase", "description" : "

Resource object representing purchase

" } }, "required" : [ "purchase" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/purchases/estimate" : { "post" : { "summary" : "Estimates for purchase", "description" : "

Deprecated\nThe purchase resource and its associated operations on this page are deprecated. Avoid using them in your integrations. The ability to purchase multiple plans in a single subscription will be supported through the Subscriptions API in the future.

Returns an estimate for creating a purchase resource. The operation works exactly like Create a purchase, except that only an estimate resource is returned without an actual purchase resource being created.

", "operationId" : "estimates_for_purchase", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "client_profile_id" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [customer](/docs/api/customers)\nthat made this purchase.\n", "maxLength" : 50, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true\nthen the Reverse Charge Mechanism\nis applicable. This field is applicable only when Australian GST is configured for your site.

", "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "

Specifies if the customer is liable for tax

\n* exempt - \n* taxable -

Computes tax for the customer based on the site configuration.\nIn 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.

", "enum" : [ "taxable", "exempt" ], "example" : null }, "entity_code" : { "type" : "string", "deprecated" : false, "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)\n.\n\\* med2 -\n\nUS Medical Device Excise Tax with taxable sales tax\n\\* med1 -\n\nUS Medical Device Excise Tax with exempt sales tax\n\\* b -\n\nState government\n\\* c -\n\nTribe/Status Indian/Indian Band\n\\* a -\n\nFederal government\n\\* f -\n\nReligious organization\n\\* g -\n\nResale\n\\* d -\n\nForeign diplomat\n\\* e -\n\nCharitable or benevolent organization\n\\* j -\n\nDirect pay permit\n\\* k -\n\nDirect mail\n\\* h -\n\nCommercial agricultural production\n\\* i -\n\nIndustrial production/manufacturer\n\\* n -\n\nLocal government\n\\* l -\n\nOther or custom\n\\* m -\n\nEducational organization\n\\* r -\n\nNon-resident\n\\* p -\n\nCommercial aquaculture\n\\* q -\n\nCommercial Fishery\n", "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "exempt_number" : { "type" : "string", "deprecated" : false, "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)\n.\n", "maxLength" : 100, "example" : null }, "exemption_details" : { "type" : "array", "deprecated" : false, "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)\nintegration.\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.\n", "items" : { "example" : null }, "example" : null }, "customer_type" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* business -\n\nWhen the purchase is made at a place of business\n\\* residential -\n\nWhen the purchase is made by a customer for home use\n\\* industrial -\n\nWhen the purchase is made by an industrial business\n\\* senior_citizen -\n\nWhen 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\n", "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "purchase_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for purchase_items\n", "properties" : { "index" : { "type" : "array", "description" : "The index or identifier of the [group](/docs/api/purchases)\nto which the item price belongs. The item prices assigned the same index belong to the same group.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "The unique identifier of the [item price](/docs/api/item_prices)\nto be added to the [group](/docs/api/purchases)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "

The quantity of the item price. Applicable only when the pricing model\nof the item price is anything other than flat_fee.\nYou can provide this value whether multi-decimal pricing\nis enabled or disabled.

", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "The price or per unit price of the item. You may provide this only when [price overriding](https://www.chargebee.com/docs/2.0/price-override.html)\nis enabled for the site.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount_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](/docs/api/getting-started)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the quantity of the item purchased. By default multi-decimal pricing\nis enabled for purchase API, it is recommended to use the purchase_items[quantity_in_decimal][0..n]\nfor providing quantity-based item prices when multi-decimal pricing is enabled. When multi-decimal pricing is disabled provide the value in purchase_items[quantity][0..n]\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null } }, "required" : [ "index", "item_price_id" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for item_tiers\n", "properties" : { "index" : { "type" : "array", "description" : "

The index or identifier of the group\nto which this tier information belongs. This must be a value from the purchase_items[index]\narray.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The unique ID of the item price to which this tier information belongs. This must be a value from the purchase_items[item_price_id]\narray.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "

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\nof the very next lower tier.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "

The highest value of quantity in this tier. For all other tiers,it must be equal to the starting_unit_in_decimal\nof the very next higher tier.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the total price of the item. The currency units in which this value is expressed depends\non the type of currency.

", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "required" : [ "index" ], "example" : null }, "shipping_addresses" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_addresses\n", "properties" : { "first_name" : { "type" : "array", "description" : "

The first name of the contact. This parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "last_name" : { "type" : "array", "description" : "

The last name of the contact. This parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "email" : { "type" : "array", "description" : "The email address.\n", "items" : { "type" : "string", "format" : "email", "deprecated" : false, "maxLength" : 70, "example" : null }, "example" : null }, "company" : { "type" : "array", "description" : "The company name.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "phone" : { "type" : "array", "description" : "The phone number.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "line1" : { "type" : "array", "description" : "

Address line 1. This parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "line2" : { "type" : "array", "description" : "Address line 2\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "line3" : { "type" : "array", "description" : "Address line 3\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "city" : { "type" : "array", "description" : "

The name of the city. This parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "state" : { "type" : "array", "description" : "The state/province name.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "state_code" : { "type" : "array", "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "country" : { "type" : "array", "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.\nThis parameter is mandatory\nwhen providing shipping information.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "zip" : { "type" : "array", "description" : "

Zip or postal code. The number of characters is validated according to the rules specified here.\nThis parameter is mandatory\nwhen providing shipping information.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 20, "example" : null }, "example" : null }, "validation_status" : { "type" : "array", "items" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* valid -\n\nAddress was validated successfully.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null }, "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "index" : { "type" : "array", "description" : "

The index or identifier of the group\nto which this discount or coupon information belongs. This must be a value from the purchase_items[index] array. When not provided, the coupon is applied to the first invoice only; irrespective of the values set for coupon.duration_typeor coupon.max_redemptions.

\n

See also:

Applying discounts
", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "coupon_id" : { "type" : "array", "description" : "The unique ID of a coupon to be applied to the group. Alternatively, you may provide a [coupon code](/docs/api/coupon_codes). Applicable only for [coupons](/docs/api/coupons). \n**See also:**\n[Applying discounts](/docs/api/purchases)\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "

The percentage of the discount. Applicable only for manual discounts. For any given array index i, provide discounts[percentage][i] or discounts[quantity][i] or discounts[amount][i]

\n

See also:

Applying discounts
", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "

The discount quantity. Applicable only for manual discounts. For any given array index i, provide discounts[percentage][i] or discounts[quantity][i] or discounts[amount][i]

\n

See also:

Applying discounts
", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "

The absolute value of the discount. The currency units in which this value is expressed depends on the type of currency. Applicable only for manual discounts.

\n

For any given array index i, provide discounts[percentage][i] or discounts[quantity][i] or discounts[amount][i]

\n

See also:

Applying discounts
", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

For manual discounts, set this to false if this manual discount should be excluded from monthly recurring revenue (MRR) calculations for the site. The following prerequisites must be met to allow this parameter to be passed:

\n\n

See also:\nApplying discounts

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "subscription_info" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription_info\n", "properties" : { "index" : { "type" : "array", "description" : "

The index or identifier of the group\nto which this subscription information belongs. This must be a value from the purchase_items[index]\narray and the group must be a subscription group\n.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "subscription_id" : { "type" : "array", "description" : "When specifying a [subscription group](/docs/api/purchases)\n, this is the unique identifier of the [subscription](/docs/api/subscriptions)\nto be created. This value must be unique for each subscription group.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "array", "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 100, "minimum" : 1, "example" : null }, "example" : null } }, "required" : [ "index" ], "example" : null }, "contract_terms" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_terms\n", "properties" : { "index" : { "type" : "array", "description" : "

The index number of the subscription/one-time group to which the item price is added. Provide a unique number between 0\nand 9\n(inclusive) for each group that is to be created. To increase this limit, contact Chargebee Support

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "action_at_term_end" : { "type" : "array", "items" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* renew - \n* 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.

\n\n* evergreen -

Contract term completes and the subscription renews.

\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "example" : null }, "cancellation_cutoff_period" : { "type" : "array", "description" : "

The number of days before contract_end\n, 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.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "index" ], "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "contract_terms" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "item_tiers" : { "style" : "deepObject", "explode" : true }, "purchase_items" : { "style" : "deepObject", "explode" : true }, "shipping_addresses" : { "style" : "deepObject", "explode" : true }, "subscription_info" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "

Resource object representing estimate

" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/payment_vouchers" : { "get" : { "summary" : "List vouchers for a customer", "description" : "Retrieves vouchers for a customer in reverse chronological order.\n", "operationId" : "list_vouchers_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent status of Payment Voucher. Possible values are : active, consumed, expired, failure.\n\n**Supported operators :**\nis, is_not, in, not_in, in, not_in\n\n**Example →**\n*status\\[is\\] = \"active, consumed, expired\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active, consumed, expired", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`active\\` - Active and ready to be consumed \\* \\`consumed\\` - Consumed for a transaction and cannot be used again \\* \\`expired\\` - Expired before consumed and cannot be used again \\* \\`failure\\` - Failed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`active\\` - Active and ready to be consumed \\* \\`consumed\\` - Consumed for a transaction and cannot be used again \\* \\`expired\\` - Expired before consumed and cannot be used again \\* \\`failure\\` - Failed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`active\\` - Active and ready to be consumed \\* \\`consumed\\` - Consumed for a transaction and cannot be used again \\* \\`expired\\` - Expired before consumed and cannot be used again \\* \\`failure\\` - Failed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "pattern" : "^\\[(active|consumed|expired|failure)(,(active|consumed|expired|failure))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`active\\` - Active and ready to be consumed \\* \\`consumed\\` - Consumed for a transaction and cannot be used again \\* \\`expired\\` - Expired before consumed and cannot be used again \\* \\`failure\\` - Failed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "pattern" : "^\\[(active|consumed|expired|failure)(,(active|consumed|expired|failure))*\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "payment_voucher" : { "$ref" : "#/components/schemas/PaymentVoucher", "description" : "Resource object representing payment_voucher" } }, "required" : [ "payment_voucher" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/payment_vouchers" : { "get" : { "summary" : "List vouchers for an invoice", "description" : "Retrieves vouchers for an invoice in reverse chronological order.\n", "operationId" : "list_vouchers_for_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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))))|(?:(?:(?:(?:(?:(?:[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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent status of Payment Voucher. Possible values are : active, consumed, expired, failure.\n\n**Supported operators :**\nis, is_not, in, not_in, in, not_in\n\n**Example →**\n*status\\[is_not\\] = \"active, consumed, expired\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active, consumed, expired", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`active\\` - Active and ready to be consumed \\* \\`consumed\\` - Consumed for a transaction and cannot be used again \\* \\`expired\\` - Expired before consumed and cannot be used again \\* \\`failure\\` - Failed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`active\\` - Active and ready to be consumed \\* \\`consumed\\` - Consumed for a transaction and cannot be used again \\* \\`expired\\` - Expired before consumed and cannot be used again \\* \\`failure\\` - Failed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`active\\` - Active and ready to be consumed \\* \\`consumed\\` - Consumed for a transaction and cannot be used again \\* \\`expired\\` - Expired before consumed and cannot be used again \\* \\`failure\\` - Failed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "pattern" : "^\\[(active|consumed|expired|failure)(,(active|consumed|expired|failure))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`active\\` - Active and ready to be consumed \\* \\`consumed\\` - Consumed for a transaction and cannot be used again \\* \\`expired\\` - Expired before consumed and cannot be used again \\* \\`failure\\` - Failed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "pattern" : "^\\[(active|consumed|expired|failure)(,(active|consumed|expired|failure))*\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "payment_voucher" : { "$ref" : "#/components/schemas/PaymentVoucher", "description" : "Resource object representing payment_voucher" } }, "required" : [ "payment_voucher" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_vouchers/{payment-voucher-id}" : { "get" : { "summary" : "Retrieve voucher data", "description" : "

Retrieves a voucher using the unique payment_voucher_id\n.

", "operationId" : "retrieve_voucher_data", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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,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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "payment-voucher-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/payment-voucher-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_voucher" : { "$ref" : "#/components/schemas/PaymentVoucher", "description" : "

Resource object representing payment_voucher

" } }, "required" : [ "payment_voucher" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_vouchers" : { "post" : { "summary" : "Create a voucher for the customer to initiate payment", "description" : "Creates a voucher type payment source. If you create this voucher type payment source using customer details, like tax ID, you can then generate a voucher with that payment source.\n", "operationId" : "create_a_voucher_for_the_customer_to_initiate_payment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]))\\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]{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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the customer for whom you want to create the voucher.\n", "maxLength" : 50, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the payment source used for generating the voucher.\n", "maxLength" : 40, "example" : null }, "voucher_payment_source" : { "type" : "object", "deprecated" : false, "description" : "Parameters for voucher_payment_source\n", "properties" : { "voucher_type" : { "type" : "string", "deprecated" : false, "description" : "The type of voucher-based payment source.\n\\* boleto -\n\nThe payment source is Boleto.\n", "enum" : [ "boleto" ], "example" : null } }, "required" : [ "voucher_type" ], "example" : null }, "invoice_allocations" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for invoice_allocations

", "properties" : { "invoice_id" : { "type" : "array", "description" : "The unique identifier of the invoice. You can pass multiple invoices IDs.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "invoice_id" ], "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "invoice_allocations" : { "style" : "deepObject", "explode" : true }, "voucher_payment_source" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_voucher" : { "$ref" : "#/components/schemas/PaymentVoucher", "description" : "

Resource object representing payment_voucher

" } }, "required" : [ "payment_voucher" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/csv_tax_rules" : { "post" : { "summary" : "Taxes Csv import", "operationId" : "taxes_csv_import", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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]))\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "tax_profile_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "default" : "*", "deprecated" : false, "maxLength" : 50, "example" : null }, "zip_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "zip_code_start" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "zip_code_end" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "tax1_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax1_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "tax1_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax1_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax1_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax2_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax2_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "tax2_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax2_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax2_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax3_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax3_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "tax3_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax3_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax3_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax4_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax4_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "tax4_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax4_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax4_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "service_type" : { "type" : "string", "deprecated" : false, "enum" : [ "digital", "other", "not_applicable" ], "example" : null }, "time_zone" : { "type" : "string", "deprecated" : false, "maxLength" : 4, "example" : null }, "valid_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "overwrite" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "csv_tax_rule" : { "$ref" : "#/components/schemas/CsvTaxRule", "description" : "Resource object representing csv_tax_rule" } }, "required" : [ "csv_tax_rule" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/currencies/{site-currency-id}/add_schedule" : { "post" : { "summary" : "Add schedule", "description" : "

This API is used to schedule exchange rate modification for a manual\nforex_type\ncurrency.

", "operationId" : "add_schedule", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "site-currency-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/site-currency-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "manual_exchange_rate" : { "type" : "string", "deprecated" : false, "description" : "

This parameter allows you to pass the exchange rate in decimal format. When forex_type\nis manual\nyou have to set the exchange rate for additional currencies in manual_exchange_rate\nparameter. A maximum of nine\ndecimal values are allowed to pass in this field.

", "maxLength" : 20, "example" : null }, "schedule_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which the exchange rate scheduled has to be updated in your site. This timestamp must be a future date.\n", "example" : null } }, "required" : [ "manual_exchange_rate", "schedule_at" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Timestamp at which the scheduled exchange rate is to be updated on your site.

", "example" : null }, "currency" : { "$ref" : "#/components/schemas/Currency", "description" : "

Resource object representing currency

" } }, "required" : [ "currency", "scheduled_at" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/currencies" : { "post" : { "summary" : "Add a new currency", "description" : "

This API is used to add a new currency to your Chargebee site. Prior to using this API, ensure that the multi-currency feature\nis enabled.\nIf the forex_type\nis set to manual\n, you can specify the manual_exchange_rate\n. Additionally, the currency code provided must adhere to the three-letter ISO standard currency codes.

", "operationId" : "add_a_new_currency", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "currency_code" : { "type" : "string", "deprecated" : false, "description" : "A three letter currency code. For example, GBR, INR, and more.\n", "maxLength" : 3, "example" : null }, "forex_type" : { "type" : "string", "deprecated" : false, "description" : "

This represents the exchange rate type set for the currency.

\n* auto -

If forex_type\nis auto\n, conversion rate will be auto updated by Chargebee every day with third party providers (using external currency conversion providers)

\n* manual -

If forex_type\nis manual\n, you will be able to set the conversion rate for the currency. You need to update the exchange rate each time your exchange rate provider changes it

", "enum" : [ "manual", "auto" ], "example" : null }, "manual_exchange_rate" : { "type" : "string", "deprecated" : false, "description" : "

This parameter allows you to pass the exchange rate in decimal format. When forex_type\nis manual\nyou have to set the exchange rate for additional currencies in manual_exchange_rate\nparameter. A maximum of nine\ndecimal values are allowed to pass in this field.

", "maxLength" : 20, "example" : null } }, "required" : [ "currency_code", "forex_type" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "currency" : { "$ref" : "#/components/schemas/Currency", "description" : "

Resource object representing currency

" } }, "required" : [ "currency" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/currencies/{site-currency-id}" : { "get" : { "summary" : "Retrieve a currency", "description" : "This API is used to retrieve an individual currency object configured within this site.\n", "operationId" : "retrieve_a_currency", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "site-currency-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/site-currency-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "currency" : { "$ref" : "#/components/schemas/Currency", "description" : "

Resource object representing currency

" } }, "required" : [ "currency" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 currency", "description" : "

This API is used to update the configured currencies within your Chargebee site.\nAdditionally, If the forex_type\nis set to manual\n, you can specify the manual_exchange_rate\n.

", "operationId" : "update_a_currency", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "site-currency-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/site-currency-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "forex_type" : { "type" : "string", "deprecated" : false, "description" : "

This represents the exchange rate type set for the currency.

\n* auto -

If forex_type\nis auto\n, conversion rate will be auto updated by Chargebee every day with third party providers (using external currency conversion providers)

\n* manual -

If forex_type\nis manual\n, you will be able to set the conversion rate for the currency. You need to update the exchange rate each time your exchange rate provider changes it

", "enum" : [ "manual", "auto" ], "example" : null }, "manual_exchange_rate" : { "type" : "string", "deprecated" : false, "description" : "

This parameter allows you to pass the exchange rate in decimal format. When forex_type\nis manual\nyou have to set the exchange rate for additional currencies in manual_exchange_rate\nparameter. A maximum of nine\ndecimal values are allowed to pass in this field.

", "maxLength" : 20, "example" : null } }, "required" : [ "forex_type" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "currency" : { "$ref" : "#/components/schemas/Currency", "description" : "

Resource object representing currency

" } }, "required" : [ "currency" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/currencies/{site-currency-id}/remove_schedule" : { "post" : { "summary" : "Remove schedule", "description" : "This API allows you to remove a scheduled exchange rate from a currency.\n", "operationId" : "remove_schedule", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "site-currency-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/site-currency-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Timestamp at which the scheduled exchange rate is to be updated on your site.

", "example" : null }, "currency" : { "$ref" : "#/components/schemas/Currency", "description" : "

Resource object representing currency

" } }, "required" : [ "currency", "scheduled_at" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/currencies/list" : { "get" : { "summary" : "List currencies", "description" : "This API is used to retrieve the list of all currencies currently configured within the site.\n", "operationId" : "list_currencies", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "currency" : { "$ref" : "#/components/schemas/Currency", "description" : "Resource object representing currency" } }, "required" : [ "currency" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ramps/{ramp-id}" : { "get" : { "summary" : "Retrieve a subscription ramp", "description" : "Retrieves a specific subscription ramp.\n", "operationId" : "retrieve_a_ramp", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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,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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "ramp-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/ramp-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp", "description" : "

Resource object representing ramp

" } }, "required" : [ "ramp" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/create_ramp" : { "post" : { "summary" : "Create a subscription ramp", "description" : "

Creates a ramp for a subscription.

Note

", "operationId" : "create_a_ramp", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "effective_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time when this ramp takes effect.

\n

Caution

", "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief summary of the pricing changes applied with this ramp.\n", "maxLength" : 250, "example" : null }, "coupons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [coupons](/docs/api/coupons)\nremoved from the subscription through this ramp. \n**Caution**\nEnsure this list does **not** include:\n\n* Coupons being added through this ramp.\n* Coupons already removed by a previous ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "discounts_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [discounts](/docs/api/discounts)\nremoved from the subscription through this ramp. \n**Caution**\nEnsure this list does not include discounts already removed by a previous ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [item prices](/docs/api/item_prices)\nremoved from the subscription through this ramp. \n**Caution**\nEnsure this list does **not** include:\n\n* Item prices being added or updated through this ramp.\n* Item prices already removed by a previous ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "An object that specifies the contract term details.\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew -

Used when you want to renew the contract term. Does the following:

\n\n* renew_once -

Used when you want to renew the contract term just once. Does the following:

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null }, "renewal_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "example" : null } }, "example" : null }, "items_to_add" : { "type" : "object", "deprecated" : false, "description" : "Details about the \\[item prices\\](/docs/api/item_prices) added to the subscription through this ramp.\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "

The unique identifier of the item price.

\n

Caution

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

", "enum" : [ "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* immediately -

The item is charged immediately on being added to the subscription.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "items_to_update" : { "type" : "object", "deprecated" : false, "description" : "Details about the \\[item prices\\](/docs/api/item_prices) updated in the subscription through this ramp.\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price. \n**Caution**\nEnsure this list:\n\n* Does not include any item price added or removed through this ramp.\n* Does not include any item price removed by a previous ramp.\n* Includes only item prices currently in the subscription or added by a previous ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* contract_termination -

when a contract term is terminated\n.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

", "enum" : [ "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* immediately -

The item is charged immediately on being added to the subscription.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "

Note\nAllowed only when both of these conditions are met:

\n

Replaces the existing item_tiers for specific item_prices within the subscription. You must provide the complete tier set for any item_price, even if you're changing the price for only one tier.

", "properties" : { "item_price_id" : { "type" : "array", "description" : "

The identifier of the item_price\nfor which the tier price is being overridden.

\n

Caution\nThe identifier must correspond to an item_price listed in either items_to_add or items_to_update.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "coupons_to_add" : { "type" : "object", "deprecated" : false, "description" : "Details about the \\[coupons\\](/docs/api/coupons) added to the subscription through this ramp.\n", "properties" : { "coupon_id" : { "type" : "array", "description" : "Unique ID of the coupon to be added. \n**Caution**\n\n* Ensure this list does not include coupons being removed through this ramp.\n* [Coupon codes](/docs/api/coupon_codes) are not supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "apply_till" : { "type" : "array", "description" : "

The date till when the coupon can be applied. Applicable for limited_period\ncoupons\nonly.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "discounts_to_add" : { "type" : "object", "deprecated" : false, "description" : "Details about the \\[discounts\\](/docs/api/discounts) added to the subscription through this ramp.\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [depends on the kind of currency.](/docs/api/currencies)\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "apply_on", "duration_type" ], "example" : null } }, "required" : [ "effective_from" ], "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true }, "coupons_to_add" : { "style" : "deepObject", "explode" : true }, "discounts_to_add" : { "style" : "deepObject", "explode" : true }, "item_tiers" : { "style" : "deepObject", "explode" : true }, "items_to_add" : { "style" : "deepObject", "explode" : true }, "items_to_update" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp", "description" : "

Resource object representing ramp

" } }, "required" : [ "ramp" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ramps" : { "get" : { "summary" : "List subscription ramps", "description" : "

Lists the subscription ramps that match the criteria provided in the filter parameters.

Note\nBy default, the ramps are returned sorted in descending order (latest first) by updated_at.

", "operationId" : "list_ramps", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\* '.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "status", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter subscription ramps based on status\n.

\n

Caution

\n

Possible values are : scheduled, succeeded, failed.

\n

Supported operators :\nis, in

\n

Example →\nstatus[is] = "SCHEDULED"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "SCHEDULED", "properties" : { "in" : { "type" : "string", "description" : "\\* \\`scheduled\\` - Status of the subscription schedule on creation. \\* \\`succeeded\\` - The execution status of the schedule if success. \\* \\`failed\\` - The execution status of the schedule if failed. \\* \\`draft\\` - Status of the subscription schedule considering as draft\n", "enum" : [ "scheduled", "succeeded", "failed", "draft" ], "pattern" : "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\]$", "example" : null }, "is" : { "type" : "string", "description" : "\\* \\`scheduled\\` - Status of the subscription schedule on creation. \\* \\`succeeded\\` - The execution status of the schedule if success. \\* \\`failed\\` - The execution status of the schedule if failed. \\* \\`draft\\` - Status of the subscription schedule considering as draft\n", "enum" : [ "scheduled", "succeeded", "failed", "draft" ], "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "

optional, string filter

\n

Filter subscription ramps based on subscription_id\n.

\n

Caution\nThis filter is mandatory when filtering by status or effective_from.

\n

Supported operators :\nis, in

\n

Example →\nsubscription_id[is] = "8gsnbYfsMLds"

", "required" : true, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8gsnbYfsMLds", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "effective_from", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter subscription ramps based on effective_from.

\n

Caution

\n

Supported operators :\nafter, before, on, between

\n

Example →\neffective_from[after] = "1435054328"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter subscription ramps based on updated_at\n.

\n

Tip\nSpecify sort_by = updated_at (whether asc oor desc) for a faster response when using this filter.

\n

Supported operators :\nafter, before, on, between

\n

Example →\nupdated_at[after] = "1435052328"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435052328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\neffective_from, created_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"effective_from\"*\n\nThis will sort the result based on the 'effective_from' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "effective_from", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "effective_from", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp", "description" : "Resource object representing ramp" } }, "required" : [ "ramp" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ramps/{ramp-id}/update" : { "post" : { "summary" : "Update a subscription ramp", "description" : "

Updates an existing subscription ramp by replacing its current attribute values with the new parameters provided. When using this API to modify a ramp, make sure to include all the ramp's attributes as you would do during creation of the ramp with the necessary values updated.\nExample: step-by-step flow\nThe following steps explains how to update effective_from value of an existing ramp.

Step 1: Retrieve current ramp values

    \n
  1. Send a request to retrieve the current values of all parameters for the subscription ramp using Retrieve a subscription ramp API.
  2. \n
  3. Review the response to get the current values of the ramp's attributes. Note down all the parameters and their values.
  4. \n

Step 2: Update ramp with new values

    \n
  1. Prepare the request to update the ramp.\n
      \n
    • Update the effective_from value in the noted down attributes of ramp from the previous step.
    • \n
    • Ensure all parameters, even those not being changed, are included in the request.
    • \n
    \n
  2. \n
  3. Send the prepared request to Update subscription ramp API.\n
      \n
    • Verify the response object to ensure a successful subscription ramp update. If it returns an error, repeat step 1 again.
    • \n
    \n
  4. \n

Note

", "operationId" : "update_a_subscription_ramp", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "ramp-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/ramp-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "effective_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time when this ramp takes effect.

\n

Caution

", "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief summary of the pricing changes applied with this ramp.\n", "maxLength" : 250, "example" : null }, "coupons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [coupons](/docs/api/coupons)\nremoved from the subscription through this ramp. \n**Caution**\nEnsure this list does **not** include:\n\n* Coupons being added through this ramp.\n* Coupons already removed by a previous ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "discounts_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [discounts](/docs/api/discounts)\nremoved from the subscription through this ramp. \n**Caution**\nEnsure this list does not include discounts already removed by a previous ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [item prices](/docs/api/item_prices)\nremoved from the subscription through this ramp. \n**Caution**\nEnsure this list does **not** include:\n\n* Item prices being added or updated through this ramp.\n* Item prices already removed by a previous ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "An object that specifies the contract term details.\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew -

Used when you want to renew the contract term. Does the following:

\n\n* renew_once -

Used when you want to renew the contract term just once. Does the following:

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null }, "renewal_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles

\n

or a custom value depending on the\nsite configuration\n.

", "example" : null } }, "example" : null }, "items_to_add" : { "type" : "object", "deprecated" : false, "description" : "Details about the \\[item prices\\](/docs/api/item_prices) added to the subscription through this ramp.\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "

The unique identifier of the item price.

\n

Caution

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

", "enum" : [ "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* immediately -

The item is charged immediately on being added to the subscription.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "items_to_update" : { "type" : "object", "deprecated" : false, "description" : "Details about the \\[item prices\\](/docs/api/item_prices) updated in the subscription through this ramp.\n", "properties" : { "item_price_id" : { "type" : "array", "description" : "The unique identifier of the item price. \n**Caution**\nEnsure this list:\n\n* Does not include any item price added or removed through this ramp.\n* Does not include any item price removed by a previous ramp.\n* Includes only item prices currently in the subscription or added by a previous ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity of the item purchased\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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](/docs/api/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_days" : { "type" : "array", "description" : "The service period of the item in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 730, "minimum" : 1, "example" : null }, "example" : null }, "charge_on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* contract_termination -

when a contract term is terminated\n.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

", "enum" : [ "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "charge_on_option" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* immediately -

The item is charged immediately on being added to the subscription.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "item_tiers" : { "type" : "object", "deprecated" : false, "description" : "

Note\nAllowed only when both of these conditions are met:

\n

Replaces the existing item_tiers for specific item_prices within the subscription. You must provide the complete tier set for any item_price, even if you're changing the price for only one tier.

", "properties" : { "item_price_id" : { "type" : "array", "description" : "

The identifier of the item_price\nfor which the tier price is being overridden.

\n

Caution\nThe identifier must correspond to an item_price listed in either items_to_add or items_to_update.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lowest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The highest value in the quantity tier.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The overridden price of the tier. The value depends on the [type of currency](/docs/api/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "pricing_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "example" : null }, "package_size" : { "type" : "array", "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null }, "coupons_to_add" : { "type" : "object", "deprecated" : false, "description" : "Details about the \\[coupons\\](/docs/api/coupons) added to the subscription through this ramp.\n", "properties" : { "coupon_id" : { "type" : "array", "description" : "Unique ID of the coupon to be added. \n**Caution**\n\n* Ensure this list does not include coupons being removed through this ramp.\n* [Coupon codes](/docs/api/coupon_codes) are not supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "apply_till" : { "type" : "array", "description" : "

The date till when the coupon can be applied. Applicable for limited_period\ncoupons\nonly.

", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "discounts_to_add" : { "type" : "object", "deprecated" : false, "description" : "Details about the \\[discounts\\](/docs/api/discounts) added to the subscription through this ramp.\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "apply_on", "duration_type" ], "example" : null } }, "required" : [ "effective_from" ], "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true }, "coupons_to_add" : { "style" : "deepObject", "explode" : true }, "discounts_to_add" : { "style" : "deepObject", "explode" : true }, "item_tiers" : { "style" : "deepObject", "explode" : true }, "items_to_add" : { "style" : "deepObject", "explode" : true }, "items_to_update" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp", "description" : "

Resource object representing ramp

" } }, "required" : [ "ramp" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ramps/{ramp-id}/delete" : { "post" : { "summary" : "Delete a subscription ramp", "description" : "

Deletes the specified subscription ramp. However, Chargebee only allows deleting a ramp if it does not conflict with future ramps on the subscription. The following checks are performed to ensure compatibility:

ConditionRestriction
The ramp contains items_to_add[]The ramp cannot be deleted if any of the items in items_to_add[] are scheduled to be updated or removed in a subsequent ramp.
The ramp contains coupons_to_add[]The ramp cannot be deleted if any of the coupons in coupons_to_add[] are scheduled to be removed in a subsequent ramp.
The ramp contains discounts_to_add[]The ramp cannot be deleted if any of the discounts in discounts_to_add[] are scheduled to be removed in a subsequent ramp.
", "operationId" : "delete_a_ramp", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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]{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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "ramp-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/ramp-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp", "description" : "

Resource object representing ramp

" } }, "required" : [ "ramp" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_schedule_schemes/{payment-schedule-scheme-id}" : { "get" : { "summary" : "Retrieve a payment schedule scheme", "description" : "This endpoint retrieves an existing payment schedule.\n", "operationId" : "retrieve_a_payment_schedule_scheme", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "payment-schedule-scheme-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/payment-schedule-scheme-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_schedule_scheme" : { "$ref" : "#/components/schemas/PaymentScheduleScheme", "description" : "

Resource object representing payment_schedule_scheme

" } }, "required" : [ "payment_schedule_scheme" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_schedule_schemes" : { "post" : { "summary" : "Create a payment schedule scheme", "description" : "Creates a payment schedule scheme. After creating a payment schedule scheme, you can use it to generate payment schedules for multiple invoices.\n", "operationId" : "create_a_payment_schedule_scheme", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "number_of_schedules" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the total number of payment schedules for the invoice. The maximum number_of_schedules\nvaries based on the period_unit\n: - Day: Up to 30 schedules

\n", "maximum" : 52, "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines the time unit for intervals between payment schedules. Possible values are: day, week, and month.\n\\* month -\n\nWhen the time unit for intervals between payment schedules is set as month\n\\* week -\n\nWhen the time unit for intervals between payment schedules is set as week\n\\* day -\n\nWhen the time unit for intervals between payment schedules is set as day\n", "enum" : [ "day", "week", "month" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The time period between the effective dates of two consecutive payment schedules, expressed in period_units. Use this parameter to have fixed intervals between payment schedules. The maximum period\nvaries based on the period_unit\n: - Day: Up to 30 days

\n", "maximum" : 30, "minimum" : 1, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "The name of a payment schedule scheme.\n", "maxLength" : 100, "example" : null }, "flexible_schedules" : { "type" : "object", "deprecated" : false, "description" : "Parameters for flexible_schedules\n", "properties" : { "period" : { "type" : "array", "description" : "The interval after which this payment schedule should be collected.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 52, "minimum" : 0, "example" : null }, "example" : null }, "amount_percentage" : { "type" : "array", "description" : "The percentage amount that this specific payment schedule should collect.\n", "items" : { "type" : "number", "format" : "decimal", "deprecated" : false, "maximum" : 100, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "name", "number_of_schedules", "period_unit" ], "example" : null }, "encoding" : { "flexible_schedules" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_schedule_scheme" : { "$ref" : "#/components/schemas/PaymentScheduleScheme", "description" : "

Resource object representing payment_schedule_scheme

" } }, "required" : [ "payment_schedule_scheme" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_schedule_schemes/{payment-schedule-scheme-id}/delete" : { "post" : { "summary" : "Delete a payment schedule scheme", "description" : "This endpoint deletes a payment schedules created for an invoice.\n", "operationId" : "delete_a_payment_schedule_scheme", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "payment-schedule-scheme-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/payment-schedule-scheme-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_schedule_scheme" : { "$ref" : "#/components/schemas/PaymentScheduleScheme", "description" : "

Resource object representing payment_schedule_scheme

" } }, "required" : [ "payment_schedule_scheme" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migrations/{pc2-migration-id}/contact_support" : { "post" : { "summary" : "Contact_support a pc2_migration", "operationId" : "contact_support_a_pc2_migration", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration" : { "$ref" : "#/components/schemas/Pc2Migration", "description" : "Resource object representing pc2_migration" } }, "required" : [ "pc2_migration" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migrations/{pc2-migration-id}" : { "get" : { "summary" : "Retrieve a pc2 migration", "operationId" : "retrieve_a_pc2_migration", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration" : { "$ref" : "#/components/schemas/Pc2Migration", "description" : "Resource object representing pc2_migration" } }, "required" : [ "pc2_migration" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migrations" : { "post" : { "summary" : "Create a pc2_migration", "operationId" : "create_a_pc2_migration", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration" : { "$ref" : "#/components/schemas/Pc2Migration", "description" : "Resource object representing pc2_migration" } }, "required" : [ "pc2_migration" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migrations/{pc2-migration-id}/initiate" : { "post" : { "summary" : "Initiate a pc2_migration", "operationId" : "initiate_a_pc2_migration", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration" : { "$ref" : "#/components/schemas/Pc2Migration", "description" : "Resource object representing pc2_migration" } }, "required" : [ "pc2_migration" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_item_families/{pc2-migration-item-family-id}/delete" : { "post" : { "summary" : "Delete draft family", "operationId" : "delete_draft_family", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][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})):){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-family-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-family-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "is_deleted" : { "type" : "boolean", "deprecated" : false, "example" : null } }, "required" : [ "is_deleted" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_item_families/{pc2-migration-item-family-id}" : { "get" : { "summary" : "Retrieve a pc2 migration item family", "operationId" : "retrieve_a_pc2_migration_item_family", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-family-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-family-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration_item_family" : { "$ref" : "#/components/schemas/Pc2MigrationItemFamily", "description" : "Resource object representing pc2_migration_item_family" } }, "required" : [ "pc2_migration_item_family" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 pc2_migration_item_family", "operationId" : "update_a_pc2_migration_item_family", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-f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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-family-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-family-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "is_default" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration_item_family" : { "$ref" : "#/components/schemas/Pc2MigrationItemFamily", "description" : "Resource object representing pc2_migration_item_family" } }, "required" : [ "pc2_migration_item_family" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_item_families" : { "get" : { "summary" : "List pc2 migration item families", "operationId" : "list_pc2_migration_item_families", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/limit", "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/offset", "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "pc2_migration_id", "in" : "query", "required" : true, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "description" : "pc2_migration reference key\n", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "pc2_migration_item_family" : { "$ref" : "#/components/schemas/Pc2MigrationItemFamily", "description" : "Resource object representing pc2_migration_item_family" } }, "required" : [ "pc2_migration_item_family" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 pc2_migration_item_family", "operationId" : "create_a_pc2_migration_item_family", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "is_default" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "pc2_migration_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, "required" : [ "id", "name", "pc2_migration_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration_item_family" : { "$ref" : "#/components/schemas/Pc2MigrationItemFamily", "description" : "Resource object representing pc2_migration_item_family" } }, "required" : [ "pc2_migration_item_family" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_items/{pc2-migration-item-id}" : { "get" : { "summary" : "Retrieve a pc2 migration item", "operationId" : "retrieve_a_pc2_migration_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration_item" : { "$ref" : "#/components/schemas/Pc2MigrationItem", "description" : "Resource object representing pc2_migration_item" } }, "required" : [ "pc2_migration_item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 pc2_migration_item", "operationId" : "update_a_pc2_migration_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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))|(?:(?:(?:(?:(?:(?:[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc2_migration_item_family_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "metadata" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "is_giftable" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "enabled_for_checkout" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "is_recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "gift_claim_redirect_url" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "maxLength" : 30, "example" : null }, "pc2_migration_item_prices" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "name" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "example" : null }, "metadata" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "example" : null }, "ref_entity_id" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "name", "ref_entity_id" ], "example" : null } }, "example" : null }, "encoding" : { "pc2_migration_item_prices" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration_item" : { "$ref" : "#/components/schemas/Pc2MigrationItem", "description" : "Resource object representing pc2_migration_item" } }, "required" : [ "pc2_migration_item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_items/{pc2-migration-item-id}/delete" : { "post" : { "summary" : "Delete draft item", "operationId" : "delete_draft_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "is_deleted" : { "type" : "boolean", "deprecated" : false, "example" : null } }, "required" : [ "is_deleted" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_items" : { "get" : { "summary" : "List pc2 migration items", "operationId" : "list_pc2_migration_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/limit", "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/offset", "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "pc2_migration_item_family", "in" : "query", "required" : true, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "description" : "Parameters for pc2_migration_item_family\n", "properties" : { "pc2_migration_id" : { "type" : "object", "deprecated" : false, "description" : "pc2_migration reference key\n", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "pc2_migration_item" : { "$ref" : "#/components/schemas/Pc2MigrationItem", "description" : "Resource object representing pc2_migration_item" } }, "required" : [ "pc2_migration_item" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 pc2_migration_item", "operationId" : "create_a_pc2_migration_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc1_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan", "addon" ], "example" : null }, "pc2_migration_item_family_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "pc2_migration_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "metadata" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "is_giftable" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "enabled_for_checkout" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "is_recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "gift_claim_redirect_url" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "maxLength" : 30, "example" : null }, "pc2_migration_item_prices" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "name" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "example" : null }, "metadata" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "example" : null }, "ref_entity_id" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "name", "ref_entity_id" ], "example" : null } }, "required" : [ "id", "name", "pc1_type", "pc2_migration_id" ], "example" : null }, "encoding" : { "pc2_migration_item_prices" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration_item" : { "$ref" : "#/components/schemas/Pc2MigrationItem", "description" : "Resource object representing pc2_migration_item" } }, "required" : [ "pc2_migration_item" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_items/applicable_items" : { "get" : { "summary" : "Applicable_items a pc2_migration_item", "operationId" : "applicable_items_a_pc2_migration_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/limit", "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/offset", "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "is_recurring", "in" : "query", "required" : true, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "pc2_migration_applicable_item" : { "$ref" : "#/components/schemas/Pc2MigrationApplicableItem", "description" : "Resource object representing pc2_migration_applicable_item" } }, "required" : [ "pc2_migration_applicable_item" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_item_prices" : { "get" : { "summary" : "List pc2 migration item prices", "operationId" : "list_pc2_migration_item_prices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/limit", "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/offset", "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "pc2_migration_id", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "description" : "pc2_migration reference key\n", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "pc2_migration_item_id", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "description" : "item reference key\n", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "is_invalid_pc1_id", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "description" : "check if pc1 autocorrection required\n", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } }, { "name" : "pc1_item_type", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "description" : "\\* \\`plan\\` - PLAN \\* \\`addon\\` - ADDON\n", "enum" : [ "plan", "addon" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`plan\\` - PLAN \\* \\`addon\\` - ADDON\n", "enum" : [ "plan", "addon" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`plan\\` - PLAN \\* \\`addon\\` - ADDON\n", "enum" : [ "plan", "addon" ], "pattern" : "^\\[(plan|addon)(,(plan|addon))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`plan\\` - PLAN \\* \\`addon\\` - ADDON\n", "enum" : [ "plan", "addon" ], "pattern" : "^\\[(plan|addon)(,(plan|addon))*\\]$", "example" : null } }, "example" : null } }, { "name" : "is_recurring", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "pc2_migration_item_price" : { "$ref" : "#/components/schemas/Pc2MigrationItemPrice", "description" : "Resource object representing pc2_migration_item_price" } }, "required" : [ "pc2_migration_item_price" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_item_prices/{pc2-migration-item-price-id}/delete" : { "post" : { "summary" : "Delete draft item price", "operationId" : "delete_draft_item_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "is_deleted" : { "type" : "boolean", "deprecated" : false, "example" : null } }, "required" : [ "is_deleted" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pc2_migration_item_prices/{pc2-migration-item-price-id}" : { "get" : { "summary" : "Retrieve a pc2 migration item price", "operationId" : "retrieve_a_pc2_migration_item_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration_item_price" : { "$ref" : "#/components/schemas/Pc2MigrationItemPrice", "description" : "Resource object representing pc2_migration_item_price" } }, "required" : [ "pc2_migration_item_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 pc2_migration_item_price", "operationId" : "update_a_pc2_migration_item_price", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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]))\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "pc2-migration-item-price-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/pc2-migration-item-price-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc2_migration_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "metadata" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "sanitized_pc1_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "is_primary_attached_item" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pc2_migration_item_price" : { "$ref" : "#/components/schemas/Pc2MigrationItemPrice", "description" : "Resource object representing pc2_migration_item_price" } }, "required" : [ "pc2_migration_item_price" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pricing_page_sessions/create_for_existing_subscription" : { "post" : { "summary" : "Create pricing page for existing subscription", "description" : "This endpoint streamlines the generation of a pricing page session to enable subscription [upgrade](https://www.chargebee.com/docs/2.0/proration.html#introduction_proration)\n, and [downgrade](https://www.chargebee.com/docs/2.0/proration.html#introduction_proration)\nworkflows using Chargebee's hosted pricing pages ([Atomic Pricing](https://www.atomicpricing.com/)\n). By providing a subscription ID as a parameter, you will obtain a hosted pricing page session URL. \nNote: [Full access key](https://www.chargebee.com/docs/api_keys.html#types-of-api-keys_full-access-key)\nauthentication is needed for this API request.\n", "operationId" : "create_pricing_page_for_existing_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The customers will be redirected to this URL upon successful checkout.\n", "maxLength" : 250, "example" : null }, "custom" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "JSON object of custom attributes (key-value pairs) used for pricing page targeting or content. \\[Configure\\](https://www.chargebee.com/docs/retention/settings-and-installation/chargebee-retention-field-mappings) custom attributes in the dashboard.\n", "example" : null }, "pricing_page" : { "type" : "object", "deprecated" : false, "description" : "Parameters for pricing page\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the pricing table for which the hosted page is created. See [documentation](https://www.chargebee.com/docs/growth/offers/customize-pricing-table#obtain-the-pricing-table-id) to obtain the pricing table id from Chargebee Growth. If you want the pricing table to be auto-selected based on your [Play configuration](https://www.chargebee.com/docs/growth/plays/plays-overview) in Chargebee Growth, do not pass this parameter. \n
\n\n**Required if**\nYou are on the legacy version of Pricing Tables (i.e. Atomic Pricing). See [documentation](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/customize-pricing-table#obtain-the-site-id-and-pricing-table-id) to obtain the pricing table id.\n\n
\n\n", "maxLength" : 50, "example" : null } }, "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of an existing subscription for which the hosted pricing page is created.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* cancel -

Contract term completes and subscription is canceled.

\n* renew - \n* renew_once -

Used when you want to renew the contract term just once. Does the following:

\n", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n* invoice_amount -

The discount is applied to the invoice sub_total.

\n

Note:\nThis enum value is not supported for pricing_page_sessions resource, soon this value will be available for this resource. For more details please reach out to atomic-pricing@chargebee.com

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

\n* 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\nand period_unit\n.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "

The value of the discount. The format of this value depends on the kind of currency\nyou want to use for a discount. This is only applicable when type\nis fixed_amount\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period\n.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period\n.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

\n* week -

A period of 7 days.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false\n.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "label" : { "type" : "array", "description" : "Label for the discount\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null } }, "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "pricing_page" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pricing_page_session" : { "$ref" : "#/components/schemas/PricingPageSession", "description" : "

Resource object representing pricing_page_session

" } }, "required" : [ "pricing_page_session" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/pricing_page_sessions/create_for_new_subscription" : { "post" : { "summary" : "Create pricing page for new subscription", "description" : "This endpoint streamlines the generation of a pricing page session to enable new subscription creation workflows using Chargebee's hosted pricing pages ([Atomic Pricing](https://www.atomicpricing.com/)\n). By providing a subscription ID and/or customer ID as a parameter, you'll obtain a pricing page session URL. \nNote: [Full access key](https://www.chargebee.com/docs/api_keys.html#types-of-api-keys_full-access-key)\nauthentication is needed for this API request.\n", "operationId" : "create_pricing_page_for_new_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?: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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The customers will be redirected to this URL upon successful checkout.\n", "maxLength" : 250, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "Sets the [context](/docs/api/business_entities) for this operation to the [business entity](/docs/api/business_entities) specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, new subscription and customer resources are created within the business entity.\n", "maxLength" : 50, "example" : null }, "auto_select_local_currency" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "", "example" : null }, "custom" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "JSON object of custom attributes (key-value pairs) used for pricing page targeting or content. \\[Configure\\](https://www.chargebee.com/docs/retention/settings-and-installation/chargebee-retention-field-mappings) custom attributes in the dashboard.\n", "example" : null }, "pricing_page" : { "type" : "object", "deprecated" : false, "description" : "Parameters for pricing page\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the pricing table for which the hosted page is created. See documentation to obtain the pricing table id from Chargebee Growth. If you want the pricing table to be auto-selected based on your Play configuration in Chargebee Growth, do not pass this parameter.

\n

Required if

", "maxLength" : 50, "example" : null } }, "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "customer" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the customer for which this hosted_page\nshould be created. When not provided, a new customer is created with the ID set to the value provided for subscription[id].\nIf subscription[id]\nis unavailable, then the customer ID is autogenerated.

\n

Required if

\n

Constraints

", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer. If not provided it will be got from contact information entered in the hosted page\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer. If not provided it will be got from contact information entered in the hosted page\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "

The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code\nis provided.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* renew_once -

Used when you want to renew the contract term just once. Does the following:

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "apply_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n* invoice_amount -

The discount is applied to the invoice sub_total.

\n

Note:\nThis enum value is not supported for pricing_page_sessions resource, soon this value will be available for this resource. For more details please reach out to atomic-pricing@chargebee.com

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "example" : null }, "duration_type" : { "type" : "array", "items" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

\n* 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\nand period_unit\n.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "example" : null }, "percentage" : { "type" : "array", "description" : "The percentage of the original amount that should be deducted from it.\n", "items" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "

The value of the discount. The format of this value depends on the kind of currency\nyou want to use for a discount. This is only applicable when type\nis fixed_amount\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "period" : { "type" : "array", "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period\n.

", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "period_unit" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period\n.

\n* day -

A period of 24 hours.

\n* year -

A period of 1 calendar year.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "example" : null }, "included_in_mrr" : { "type" : "array", "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false\n.

", "items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "example" : null }, "item_price_id" : { "type" : "array", "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\nis specific_item_price\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Specifies the number of free units provided for the item, without affecting the total quantity sold\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "label" : { "type" : "array", "description" : "Label for the discount\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "duration_type" ], "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "pricing_page" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "pricing_page_session" : { "$ref" : "#/components/schemas/PricingPageSession", "description" : "

Resource object representing pricing_page_session

" } }, "required" : [ "pricing_page_session" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_pc_meta_records" : { "get" : { "summary" : "List site pc meta records", "operationId" : "list_site_pc_meta_records", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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]|(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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/limit", "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/offset", "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "site_pc_meta_record" : { "$ref" : "#/components/schemas/SitePcMetaRecord", "description" : "Resource object representing site_pc_meta_record" } }, "required" : [ "site_pc_meta_record" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/omnichannel_subscriptions/{omnichannel-subscription-id}/move" : { "post" : { "summary" : "Move an omnichannel subscription", "description" : "

Moves an omnichannel_subscription\nto another customer. Updates the Omnichannel subscription's customer ID and related records, then triggers the OMNICHANNEL_SUBSCRIPTION_MOVED_IN\nwebhook with the new customer details.

", "operationId" : "move_an_omnichannel_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "omnichannel-subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/omnichannel-subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "to_customer_id" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the unique ID of the customer\nresource to which the subscription will be moved.

", "maxLength" : 50, "example" : null } }, "required" : [ "to_customer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription", "description" : "

Resource object representing Omnichannel subscription

" } }, "required" : [ "omnichannel_subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/omnichannel_subscriptions/{omnichannel-subscription-id}" : { "get" : { "summary" : "Retrieve an omnichannel subscription", "description" : "

Retrieves an omnichannel_subscription object using an omnichannel_subscription_id. You can get the omnichannel_subscription_id for any successfully recorded purchase in Chargebee using List Omnichannel subscriptions API.

", "operationId" : "retrieve_an_omnichannel_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "omnichannel-subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/omnichannel-subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription", "description" : "

Resource object representing Omnichannel subscription

" } }, "required" : [ "omnichannel_subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/omnichannel_subscriptions/{omnichannel-subscription-id}/omnichannel_transactions" : { "get" : { "summary" : "List omnichannel transactions of an omnichannel subscription", "description" : "

Returns a list of omnichannel_transaction\nassociated with the specified omnichannel_subscription\n.

", "operationId" : "list_omnichannel_transactions_of_an_omnichannel_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "omnichannel-subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/omnichannel-subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction", "description" : "Resource object representing omnichannel_transaction" } }, "required" : [ "omnichannel_transaction" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/omnichannel_subscriptions" : { "get" : { "summary" : "List omnichannel subscriptions", "description" : "

Returns a list of omnichannel_subscription\n.

", "operationId" : "list_omnichannel_subscriptions", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "source", "in" : "query", "description" : "optional, enumerated string filter\n\nTo filter based on OmnichannelSubscription Source. Possible values are : apple_app_store, google_play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*source\\[is_not\\] = \"apple_app_store\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "apple_app_store", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`apple_app_store\\` - Source of the app is apple app store \\* \\`google_play_store\\` - Source of the app is google play store\n", "enum" : [ "apple_app_store", "google_play_store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`apple_app_store\\` - Source of the app is apple app store \\* \\`google_play_store\\` - Source of the app is google play store\n", "enum" : [ "apple_app_store", "google_play_store" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`apple_app_store\\` - Source of the app is apple app store \\* \\`google_play_store\\` - Source of the app is google play store\n", "enum" : [ "apple_app_store", "google_play_store" ], "pattern" : "^\\[(apple_app_store|google_play_store)(,(apple_app_store|google_play_store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`apple_app_store\\` - Source of the app is apple app store \\* \\`google_play_store\\` - Source of the app is google play store\n", "enum" : [ "apple_app_store", "google_play_store" ], "pattern" : "^\\[(apple_app_store|google_play_store)(,(apple_app_store|google_play_store))*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nChargebee Customer External Identifier.\n\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"8gsnbYfsMLds\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nA unique and immutable identifier for the omnichannel subscription.\n\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"os_1mG9tGuVIecbkzR\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "os_1mLYRDcVIHV1nd3", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "id_at_source", "in" : "query", "description" : "

optional, string filter

\n

The identifier of the subscription in the source.\nFor Apple App Store, this is the initial purchase Transaction ID; for Google Play Store, this is the Purchase Token.

\n

Supported operators :\nis, is_not, starts_with, in, not_in

\n

Example →\nid_at_source[is] = "2000000123456789"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "2000001162945130", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp (UTC) indicating when the subscription was last updated.\n\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1777902633\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1777556762", "properties" : { "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null }, "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null } } } }, { "name" : "purchased_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp (UTC) when the subscription was originally purchased in the respective marketplace (initial purchase).\n\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*purchased_at\\[after\\] = \"1777559357\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1777556271", "properties" : { "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null }, "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } }, { "name" : "omnichannel_subscription_item", "in" : "query", "description" : "Parameters for omnichannel_subscription_item\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "status" : { "type" : "object", "deprecated" : false, "description" : "

Status of the omnichannel_subscription_item.\nLearn more\nabout status and their mapping with the store's status.

", "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`expired\\` - expired \\* \\`cancelled\\` - cancelled \\* \\`in_dunning\\` - in_dunning \\* \\`in_grace_period\\` - in_grace_period \\* \\`paused\\` - paused\n", "enum" : [ "active", "expired", "cancelled", "in_dunning", "in_grace_period", "paused" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`expired\\` - expired \\* \\`cancelled\\` - cancelled \\* \\`in_dunning\\` - in_dunning \\* \\`in_grace_period\\` - in_grace_period \\* \\`paused\\` - paused\n", "enum" : [ "active", "expired", "cancelled", "in_dunning", "in_grace_period", "paused" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`expired\\` - expired \\* \\`cancelled\\` - cancelled \\* \\`in_dunning\\` - in_dunning \\* \\`in_grace_period\\` - in_grace_period \\* \\`paused\\` - paused\n", "enum" : [ "active", "expired", "cancelled", "in_dunning", "in_grace_period", "paused" ], "pattern" : "^\\[(active|expired|cancelled|in_dunning|in_grace_period|paused)(,(active|expired|cancelled|in_dunning|in_grace_period|paused))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`active\\` - active \\* \\`expired\\` - expired \\* \\`cancelled\\` - cancelled \\* \\`in_dunning\\` - in_dunning \\* \\`in_grace_period\\` - in_grace_period \\* \\`paused\\` - paused\n", "enum" : [ "active", "expired", "cancelled", "in_dunning", "in_grace_period", "paused" ], "pattern" : "^\\[(active|expired|cancelled|in_dunning|in_grace_period|paused)(,(active|expired|cancelled|in_dunning|in_grace_period|paused))*\\]$", "example" : null } } }, "item_id_at_source" : { "type" : "object", "deprecated" : false, "description" : "

Product ID in the source.

", "example" : "gold", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription", "description" : "Resource object representing omnichannel_subscription" } }, "required" : [ "omnichannel_subscription" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/omnichannel_subscription_items/{omnichannel-subscription-item-id}/scheduled_changes" : { "get" : { "summary" : "List scheduled changes for omnichannel subscription item", "description" : "

Returns a list of omnichannel_subscription_item_scheduled_change\nassociated with the specified omnichannel_subscription_item\n.

", "operationId" : "list_scheduled_changes_for_omnichannel_subscription_item", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "omnichannel-subscription-item-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/omnichannel-subscription-item-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "omnichannel_subscription_item_scheduled_change" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChange", "description" : "Resource object representing omnichannel_subscription_item_scheduled_change" } }, "required" : [ "omnichannel_subscription_item_scheduled_change" ], "example" : null }, "example" : null }, "next_offset" : { "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`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/recorded_purchases/{recorded-purchase-id}" : { "get" : { "summary" : "Retrieve a recorded purchase", "description" : "

The Retrieve a Recorded Purchase API retrieves a recorded_purchase object using the recorded_purchase.id returned in the response of the Record a Purchase API. You can use this API to check if the purchase was successfully recorded in Chargebee and to obtain the omnichannel_transaction_id and omnichannel_subscription_id associated with the successfully recorded purchase.

", "operationId" : "retrieve_a_recorded_purchase", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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[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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "recorded-purchase-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/recorded-purchase-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "recorded_purchase" : { "$ref" : "#/components/schemas/RecordedPurchase", "description" : "

Resource object representing Recorded purchase

" } }, "required" : [ "recorded_purchase" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/recorded_purchases" : { "post" : { "summary" : "Record a purchase", "description" : "

The Record a Purchase API allows you to record in-app purchases made through channels such as the Apple App Store and Google Play Store in Chargebee. When you invoke this API, it initiates a purchase recording job and returns the recorded_purchase resource in the response. As part of the job, the API verifies the provided source specific request payload like transaction_id for Apple App Store or purchase_token for Google Play Store with the source such as apple_app_store or google_play_store respectively. If the verification is successful, the corresponding purchase is recorded in Chargebee. Upon completion, the recorded_purchase resource will include the relevant omnichannel_transaction_id and omnichannel_subscription_id.\nSince this operation is asynchronous, you need to check the status attribute of the recorded_purchase resource to track the job status: in_process, completed, or failed.\nNote: Upon successful completion of this asynchronous operation, Chargebee triggers the omnichannel_subscription_created event.\nIf the recorded_purchase status is failed, review the error_detail attribute and take corrective action to re-record the purchase.\nYou can use this API to record new and older purchases made on Apple App Store or Google Play Store by passing the transaction_id or purchase_token respectively received during the subscription purchase. You can record purchases for subscriptions that are in Active or Expired status.

", "operationId" : "record_a_purchase", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "app_id" : { "type" : "string", "deprecated" : false, "description" : "

App Identifier in Chargebee. This is the handle created by Chargebee for your app. To get the app_id:

\n", "maxLength" : 100, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the customer\nobject that is associated with this purchase. The customer is created if one does not already exist.

", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Used only when the customer is being created.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer. Used only when the customer is being created.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer. Used only when the customer is being created.\n", "maxLength" : 150, "example" : null } }, "required" : [ "id" ], "example" : null }, "apple_app_store" : { "type" : "object", "deprecated" : false, "description" : "

The source specific request payload that will be used to record the purchase. Provide parameters as apple_app_store[]

", "properties" : { "transaction_id" : { "type" : "string", "deprecated" : false, "description" : "

The transaction_id\nreceived from Apple App Store during a new subscription purchase or the re-purchase of an expired\nsubscription.

", "maxLength" : 100, "example" : null }, "receipt" : { "type" : "string", "deprecated" : false, "description" : "

The receipt\nfrom which transaction_id\nis fetched and recorded

", "maxLength" : 65000, "example" : null }, "product_id" : { "type" : "string", "deprecated" : false, "description" : "

The product_id\nfor which the purchase has to be recorded

", "maxLength" : 255, "example" : null } }, "example" : null }, "google_play_store" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for google_play_store

", "properties" : { "purchase_token" : { "type" : "string", "deprecated" : false, "description" : "

The purchase_token\nreceived from the Google Play Store either from the Android device during a new subscription purchase or from the Google Play Console. You can record purchase tokens using this API if the subscription state in Google is SUBSCRIPTION_STATE_ACTIVE\n.

", "maxLength" : 500, "example" : null }, "product_id" : { "type" : "string", "deprecated" : false, "description" : "

InApp product_id\non the google_play_store\nfor which the purchase has to be recorded. This is applicable only when recording google one time orders.

", "maxLength" : 255, "example" : null }, "order_id" : { "type" : "string", "deprecated" : false, "description" : "

The order_id\nreceived from the Google Play Store either from the Android device during a purchase or from the Google Play Console. It is recommended to use the order_id\ninstead of purchase_token\n.

", "maxLength" : 100, "example" : null } }, "example" : null }, "omnichannel_subscription" : { "type" : "object", "deprecated" : false, "description" : "

Parameters for omnichannel_subscriptions

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the id\nto assign as the omnichannel subscription identifier for this purchase. If not provided, Chargebee automatically generates an ID.

", "maxLength" : 50, "example" : null } }, "example" : null } }, "required" : [ "app_id" ], "example" : null }, "encoding" : { "apple_app_store" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "google_play_store" : { "style" : "deepObject", "explode" : true }, "omnichannel_subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "recorded_purchase" : { "$ref" : "#/components/schemas/RecordedPurchase", "description" : "

Resource object representing Recorded purchase

" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "

Resource object representing customer

" } }, "required" : [ "customer", "recorded_purchase" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/omnichannel_one_time_orders" : { "get" : { "summary" : "List omnichannel one time orders", "description" : "

Retrieves a list of omnichannel_one_time_orders\nobjects.

", "operationId" : "list_omnichannel_one_time_orders", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "source", "in" : "query", "description" : "optional, enumerated string filter\n\nTo filter based on OmnichannelOneTimeOrder Source. Possible values are : apple_app_store, google_play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*source\\[is_not\\] = \"apple_app_store\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "apple_app_store", "properties" : { "is" : { "type" : "string", "description" : "\\* \\`apple_app_store\\` - Source of the app is apple app store \\* \\`google_play_store\\` - Source of the app is google play store\n", "enum" : [ "apple_app_store", "google_play_store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "\\* \\`apple_app_store\\` - Source of the app is apple app store \\* \\`google_play_store\\` - Source of the app is google play store\n", "enum" : [ "apple_app_store", "google_play_store" ], "example" : null }, "in" : { "type" : "string", "description" : "\\* \\`apple_app_store\\` - Source of the app is apple app store \\* \\`google_play_store\\` - Source of the app is google play store\n", "enum" : [ "apple_app_store", "google_play_store" ], "pattern" : "^\\[(apple_app_store|google_play_store)(,(apple_app_store|google_play_store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "\\* \\`apple_app_store\\` - Source of the app is apple app store \\* \\`google_play_store\\` - Source of the app is google play store\n", "enum" : [ "apple_app_store", "google_play_store" ], "pattern" : "^\\[(apple_app_store|google_play_store)(,(apple_app_store|google_play_store))*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nChargebee Customer External Identifier.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*customer_id\\[is\\] = \"8gsnbYfsMLds\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "omnichannel_one_time_order" : { "$ref" : "#/components/schemas/OmnichannelOneTimeOrder", "description" : "Resource object representing omnichannel_one_time_order" } }, "required" : [ "omnichannel_one_time_order" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/omnichannel_one_time_orders/{omnichannel-one-time-order-id}" : { "get" : { "summary" : "Retrieve a one time order", "description" : "

Retrieves an omnichannel_one_time_order object using its omnichannel_one_time_order_id. You can obtain the omnichannel_one_time_order_id for any successfully recorded purchase in Chargebee by using the List Omnichannel One-Time Orders API.

", "operationId" : "retrieve_an_omnichannel_one_time_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "omnichannel-one-time-order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/omnichannel-one-time-order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "omnichannel_one_time_order" : { "$ref" : "#/components/schemas/OmnichannelOneTimeOrder", "description" : "

Resource object representing omnichannel_one_time_order

" } }, "required" : [ "omnichannel_one_time_order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/rules/{rule-id}" : { "get" : { "summary" : "Retrieve rule data", "operationId" : "retrieve_rule_data", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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A-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "rule-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/rule-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "rule" : { "$ref" : "#/components/schemas/Rule", "description" : "Resource object representing rule" } }, "required" : [ "rule" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/meters" : { "get" : { "summary" : "List all available meters", "description" : "Retrieves the list of meters configured for the site.\n", "operationId" : "list_all_available_meters", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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):){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "name", "in" : "query", "description" : "

optional, string filter

\n

Filter meters based on name.

\n

Supported operators :\nis, starts_with

\n

Example →\nname[starts_with] = "API"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "

optional, string filter

\n

Sorts based on the specified attribute.

\n

Supported attributes :\nid, name, created_at, updated_at

\n

Supported sort-orders :\nasc, desc

\n

Example →\nsort_by[desc] = "updated_at"

\n

This sorts the result based on the updated_at attribute in descending order (most recently updated first).

", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "id", "name", "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "id", "name", "created_at", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "meter" : { "$ref" : "#/components/schemas/Meter", "description" : "Resource object representing meter" } }, "required" : [ "meter" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/usage_events" : { "post" : { "summary" : "Ingest a usage event", "description" : "This endpoint ingests a usage event into Chargebee. \n**See also**\n\n* [Limits for Usage-based Billing in Chargebee](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/understanding-usages#usage-based-billing-limits)\n", "operationId" : "create_a_usage_event", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "deduplication_id" : { "type" : "string", "deprecated" : false, "description" : "

An identifier used by the Chargebee's customer to distinguish between multiple events generated at the same timestamp for a single subscription_id.\nThe combination of usage_timestamp, subscription_id, and deduplication_id uniquely identifies each event.

\n

Example:\nIf 3 events are generated for subscription_id = sub-1 at 2025-04-01T00:00:00.000Z, each event must have a distinct deduplication_id.

", "maxLength" : 36, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of a subscription.

\n

Note:

", "maxLength" : 50, "example" : null }, "usage_timestamp" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The timestamp indicating when this usage occurred, represented as Epoch\ntime in milliseconds\n.\nExample: 1738732394123\nrepresents the timestamp for February 5, 2025, at 05:13:14.123 UTC.

\n

Note:\nThe timestamp must be within the last 12 hours\n.

", "example" : null }, "properties" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

A schema-less field that accepts any JSON-formatted data to define the attributes of the ingested event. It is a requirement to structure the data in a flat format wherever possible for better compatibility with downstream processing.\nWe strongly encourage using unique field names-particularly for fields intended for metering purposes. This approach enhances clarity and maintainability in the future.\nFor example, a field named status,

\n\n

Note:

", "example" : null } }, "required" : [ "deduplication_id", "properties", "subscription_id", "usage_timestamp" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "usage_event" : { "$ref" : "#/components/schemas/UsageEvent", "description" : "

Resource object representing usage_event

" } }, "required" : [ "usage_event" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.ingest.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.ingest.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] } }, "/batch/usage_events" : { "post" : { "summary" : "Ingest usage events in batch", "description" : "This endpoint ingests a batch of usage events into Chargebee. \n**Note**\n: - You can ingest **500** events in a batch ingestion. \n**See also**\n\n* [Limits for Usage-based Billing in Chargebee](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/understanding-usages#usage-based-billing-limits)\n", "operationId" : "ingest_usages_in_batch", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "events" : { "type" : "object", "deprecated" : false, "description" : "Parameters for batch usage events\n", "properties" : { "deduplication_id" : { "type" : "array", "description" : "

An identifier used by the Chargebee's customer to distinguish between multiple events generated at the same timestamp for a single subscription_id.\nThe combination of usage_timestamp, subscription_id, and deduplication_id uniquely identifies each event.

\n

Example:\nIf 3 events are generated for subscription_id = sub-1 at 2025-04-01T00:00:00.000Z, each event must have a distinct deduplication_id.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 36, "example" : null }, "example" : null }, "subscription_id" : { "type" : "array", "description" : "

The unique identifier of a subscription.

\n

Note:

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "usage_timestamp" : { "type" : "array", "description" : "

The timestamp indicating when this usage occurred, represented as Epoch\ntime in milliseconds\n.\nExample: 1738732394123\nrepresents the timestamp for February 5, 2025, at 05:13:14.123 UTC.

\n

Note:\nThe timestamp must be within the last 12 hours\n.

", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "properties" : { "type" : "array", "description" : "

A schema-less field that accepts any JSON-formatted data to define the attributes of the ingested event. It is a requirement to structure the data in a flat format wherever possible for better compatibility with downstream processing.\nWe strongly encourage using unique field names-particularly for fields intended for metering purposes. This approach enhances clarity and maintainability in the future.\nFor example, a field named status,

\n\n

Note:

", "items" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "deduplication_id", "properties", "subscription_id", "usage_timestamp" ], "example" : null } }, "example" : null }, "encoding" : { "events" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "batch_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier for the batch of usage events processed.

", "x-cb-attribute-pcv" : 2, "maxLength" : 36, "example" : null }, "failed_events" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null } }, "required" : [ "batch_id", "failed_events" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.ingest.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.ingest.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] } }, "/metered_features/{metered-feature-id}/reactivate_command" : { "post" : { "summary" : "Reactivate a metered feature", "description" : "

Restores a previously archived metered feature status back to active.

\n

Prerequisites & Constraints

\n

Impacts

Metered feature

    \n
  • The metered feature status is changed to active.
  • \n
  • The meter status is changed to active.
  • \n

Entitlements and subscription entitlements

", "operationId" : "reactivate_a_metered_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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"name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "metered-feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/metered-feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "meter" : { "$ref" : "#/components/schemas/Meter", "description" : "

Resource object representing the meter for the metered feature.

" } }, "required" : [ "meter" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/metered_features/{metered-feature-id}/delete" : { "post" : { "summary" : "Delete a metered feature", "description" : "

Permanently deletes a metered feature.

\n

Prerequisites & Constraints

\n

Impacts

Entitlements and subscription entitlements

Any entitlements and subscription entitlements defined for the feature are removed.

", "operationId" : "delete_a_metered_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "metered-feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/metered-feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "meter" : { "$ref" : "#/components/schemas/Meter", "description" : "

Resource object representing the meter for the metered feature.

" } }, "required" : [ "meter" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/metered_features" : { "post" : { "summary" : "Create a metered feature", "description" : "Creates a metered feature.\n", "operationId" : "create_a_metered_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive name for the metered feature. For example: API Calls, Input Tokens.

", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief description of the metered feature.\n", "maxLength" : 250, "example" : null }, "feature_unit" : { "type" : "string", "deprecated" : false, "description" : "

Unit of measure for the metered feature, in singular form. It is pluralized automatically as needed. For example, request or token.

", "maxLength" : 50, "example" : null }, "query" : { "type" : "string", "deprecated" : false, "description" : "

The SQL query used to measure usage from usage_event properties. For example: SELECT SUM(api_calls) FROM events.

\n

Constraint:

", "maxLength" : 500, "example" : null }, "column_definitions" : { "type" : "object", "deprecated" : false, "description" : "

Definitions of the columns or properties referenced by the query.

", "properties" : { "column_name" : { "type" : "array", "description" : "

Name of the column or property used in the query.

\n

Constraint:

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "data_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Data type of the column or property.\n\\* number -\n\nThe column or property holds a numeric value.\n\\* string -\n\nThe column or property holds a string value.\n", "enum" : [ "number", "string" ], "example" : null }, "example" : null } }, "required" : [ "column_name", "data_type" ], "example" : null } }, "required" : [ "feature_unit", "name", "query" ], "example" : null }, "encoding" : { "column_definitions" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "meter" : { "$ref" : "#/components/schemas/Meter", "description" : "

Resource object representing the meter for the metered feature.

" } }, "required" : [ "meter" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/metered_features/{metered-feature-id}/archive_command" : { "post" : { "summary" : "Archive a metered feature", "description" : "

Archives a metered feature and its associated meter.

\n

Prerequisites & Constraints

\n

Impacts

Entitlements and subscription entitlements

    \n
  • New entitlements and subscription entitlements cannot be created for the feature when it's archived.
  • \n
  • Pre-existing entitlements and subscription entitlements remain effective.
  • \n

Feature and meter

    \n
  • The feature and meter status are changed to archived.
  • \n
", "operationId" : "archive_a_metered_feature", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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,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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "metered-feature-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/metered-feature-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "meter" : { "$ref" : "#/components/schemas/Meter", "description" : "

Resource object representing the meter for the metered feature.

" } }, "required" : [ "meter" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/usage_files/{usage-file-id}/processing_status" : { "get" : { "summary" : "Retrieve file processing status", "description" : "Use this endpoint to get the current status and details of a usage events file.\n", "operationId" : "get_uploaded_file_processing_status", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "usage-file-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/usage-file-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "usage_file" : { "$ref" : "#/components/schemas/UsageFile", "description" : "

Resource object representing usage_file

" } }, "required" : [ "usage_file" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.file-ingest.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.file-ingest.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] } }, "/usage_files/upload_url" : { "post" : { "summary" : "Retrieve usage file upload URL", "description" : "

This endpoint returns an upload URL for uploading usage events files, allowing you to upload files in supported formats. The file is processed asynchronously, and its status can be tracked using the retrieve_file_processing_status endpoint.

Before uploading, review the following guidelines and constraints:

", "operationId" : "get_usages_file_upload_url", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "file_name" : { "type" : "string", "deprecated" : false, "description" : "

Name of the file being uploaded.

\n

Note:\nNo special characters are allowed in the file_name\nexcept for underscores _\nand hyphens -\n.Example:

Valid file nameInvalid file name
merchant_data.csvmerchant@data.csv
sales_report-2024.csvsales&report-2024.csv
customer_details_file.csvcustomer!details#file.csv
", "maxLength" : 150, "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "description" : "

Indicates the format of a file.

\n

Note:\nCurrently, only text/csv\nis supported.

", "maxLength" : 100, "example" : null } }, "required" : [ "file_name", "mime_type" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "usage_file" : { "$ref" : "#/components/schemas/UsageFile", "description" : "

Resource object representing usage_file

" } }, "required" : [ "usage_file" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.file-ingest.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.file-ingest.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] } }, "/personalized_offers" : { "post" : { "summary" : "List personalized offers", "description" : "This API is used to retrieve a list of personalized offer(s) for a customer based on the context (such as customer or subscription details and end-user attributes). This allows you to retrieve any active offers targeted to the user.\nYou can pre-call this API as soon as you have the user context at the point of login, or can call this API at any other point in the user journey when an offer is to be shown.\n\nSystem evaluates eligibility and mapping to the right offer based on:\n\n* Customer profile and subscription information.\n* Device and browsing context.\n* Custom fields.\n* Play configurations.\n\n**Note**\n\n* Although the response is modeled as a list, the API currently returns at most one personalized offer (the best-matched offer for the user).\n* If no offers are available, the list will be empty. No error is thrown in this case; an empty result is a valid response.\n\n**Features of this API**\n\nThe List Personalized Offers endpoint allows you to:\n\n* Retrieve context-aware offers targeted to customers or end users.\n* Leverage multiple signals (profile, subscription, device/browser context, custom fields, and plays).\n* Call flexibly at login, checkout, renewal, or any point in the user journey.Handle gracefully when no offers are available (returns an empty list, not an error).\n* Support both B2C (single user per customer) and B2B (multiple end users per customer) scenarios.\n", "operationId" : "list_personalized_offers", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer. \n**Note**\nThis parameter is ignored if it is not mapped to any field in the [settings](https://www.chargebee.com/docs/retention/chargebee-billing-integration.html#syncing-and-mapping-chargebee-fields-into-chargebee-retention).\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer. \n**Note**\nThis parameter is ignored if it is not mapped to any field in the [settings](https://www.chargebee.com/docs/retention/chargebee-billing-integration.html#syncing-and-mapping-chargebee-fields-into-chargebee-retention).\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Customer's email address. \n**Note**\nThis parameter is ignored if it is not mapped to any field in the [settings](https://www.chargebee.com/docs/retention/chargebee-billing-integration.html#syncing-and-mapping-chargebee-fields-into-chargebee-retention).\n", "maxLength" : 70, "example" : null }, "roles" : { "type" : "array", "deprecated" : false, "description" : "Roles or user types associated with the end user. (Useful in offer targeting for B2B scenarios with multiple user roles.). \n**Note**\nThis parameter is ignored if it is not mapped to any field in the [settings](https://www.chargebee.com/docs/retention/chargebee-billing-integration.html#syncing-and-mapping-chargebee-fields-into-chargebee-retention).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "external_user_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the user in the your system. This is used to identify the user for whom the offer is being created. \n**Note**\nThis parameter is ignored if it is not mapped to any field in the [settings](https://www.chargebee.com/docs/retention/chargebee-billing-integration.html#syncing-and-mapping-chargebee-fields-into-chargebee-retention).\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the subscription for which the offer should be retrieved.\n**Notes:**\n\n* **Required** if multiple brands are configured in your Growth application.\n* **Recommended** to always provide.\n* If omitted and the customer has multiple subscriptions, the system attempts to retrieve the offer associated with one of their subscriptions.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the customer in the billing system (Chargebee customer ID).\n", "maxLength" : 50, "example" : null }, "custom" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "JSON object of custom attributes (key-value pairs) used for offer targeting or content. \\[Configure\\](https://www.chargebee.com/docs/retention/settings-and-installation/chargebee-retention-field-mappings) custom attributes in the dashboard. \\*\\*Note\\*\\* This parameter is ignored if it is not mapped to any field in the \\[settings\\](https://www.chargebee.com/docs/retention/chargebee-billing-integration.html#syncing-and-mapping-chargebee-fields-into-chargebee-retention).\n", "example" : null }, "request_context" : { "type" : "object", "deprecated" : false, "description" : "A JSON object with standard context attributes (browser, device, locale, etc.) of the end user's session. This can help in offer targeting based on user environment.\n", "properties" : { "user_agent" : { "type" : "string", "deprecated" : false, "description" : "The user's browser or device user agent string. Helps determine browser and platform details.\nFor example, chrome/7.10\n", "maxLength" : 255, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "description" : "The user's locale setting (e.g., en-US, fr-FR). Useful for regional offer targeting.\n", "maxLength" : 50, "example" : null }, "timezone" : { "type" : "string", "deprecated" : false, "description" : "The user's timezone identifier (e.g., America/New_York). Used for contextual targeting based on time.\n", "maxLength" : 64, "example" : null }, "url" : { "type" : "string", "deprecated" : false, "description" : "The current page URL where the offer is being displayed. Useful for context-sensitive offers.\n", "maxLength" : 250, "example" : null }, "referrer_url" : { "type" : "string", "deprecated" : false, "description" : "The referring page URL, i.e., the previous page that navigated the user to the current one. Can help with attribution analysis.\n", "maxLength" : 250, "example" : null } }, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "request_context" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "personalized_offers" : { "type" : "array", "description" : "

List of best offers to be shown to the customer. Currently this will always return one personalized offer. This will be empty if no best offers are found.

", "items" : { "$ref" : "#/components/schemas/PersonalizedOffer", "description" : "Resource object representing personalized_offer" }, "example" : null }, "brand" : { "$ref" : "#/components/schemas/Brand", "description" : "

Resource object representing brand

" }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The timestamp until which the offer remains active. After this time, you must retrieve the offer again via the List Personalised Offers API to get the latest.

", "example" : null } }, "required" : [ "expires_at", "personalized_offers" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] } }, "/offer_fulfillments" : { "post" : { "summary" : "Create an offer fulfillment", "description" : "

This API notifies that a user has accepted an offer, logs an accepted event immediately for reporting, and triggers a backend processing depending on the offer's processing_type.\nYou can call this API when a user accepts an offer (e.g., the user clicked Accept Offer or a similar confirmation).\nThis API will record an accepted event as soon as the API is called and initiate the appropriate fulfillment mechanism according to processing_type:

", "operationId" : "create_an_offer_fulfillment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "personalized_offer_id" : { "type" : "string", "deprecated" : false, "description" : "ID of the personalized offer that was accepted.\n", "maxLength" : 50, "example" : null }, "option_id" : { "type" : "string", "deprecated" : false, "description" : "ID of the Offer Option that the user accepted.\n", "maxLength" : 50, "example" : null } }, "required" : [ "option_id", "personalized_offer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "202" : { "description" : "Accepted", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "offer_fulfillment" : { "$ref" : "#/components/schemas/OfferFulfillment", "description" : "

Represents the fulfillment created for the offer.

" }, "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "

Represents the hosted page created for the offer. This is returned only if the selected offer option's processing_type\nis checkout.

" } }, "required" : [ "offer_fulfillment" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] } }, "/offer_fulfillments/{offer-fulfillment-id}" : { "get" : { "summary" : "Retrieve an offer fulfillment", "description" : "This API is used to retrieve the fulfillment record. This is typically used to check the latest status of an asynchronous offer fulfillment. You can use this after creating an offer fulfillment (billing update or checkout).\n", "operationId" : "retrieve_an_offer_fulfillment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "offer-fulfillment-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/offer-fulfillment-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "offer_fulfillment" : { "$ref" : "#/components/schemas/OfferFulfillment", "description" : "

Represents the fulfillment created for the offer.

" } }, "required" : [ "offer_fulfillment" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] }, "post" : { "summary" : "Update an offer fulfillment", "description" : "

This API is used to update the status of offer fulfillment for the processing types url_redirect, webhook and email as Chargebee cannot automatically fulfill these offers.\nIf status = failed, you must include a failure_reason to explain why the fulfillment did not succeed. The system logs a fulfilled event when status = completed or a failed event when status = failed.\nNote: If the offer fulfillment is not marked as completed or failed within 7 days, Chargebee will mark the offer fulfillment as failed with the error code as external_fulfillment_failed.

", "operationId" : "update_an_offer_fulfillment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "offer-fulfillment-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/offer-fulfillment-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "ID of the fulfillment that is being updated.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Final state of the fulfillment.\n\\* failed -\n\nPass this if the fulfillment is failed.\n\\* completed -\n\nPass this if the fulfillment is completed.\n", "enum" : [ "completed", "failed" ], "example" : null }, "failure_reason" : { "type" : "string", "deprecated" : false, "description" : "

Explanation for failure; required when status\n= failed\n.

", "maxLength" : 100, "example" : null } }, "required" : [ "id", "status" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "offer_fulfillment" : { "$ref" : "#/components/schemas/OfferFulfillment", "description" : "

Represents the fulfillment created for the offer.

" } }, "required" : [ "offer_fulfillment" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] } }, "/offer_events" : { "post" : { "summary" : "Create an offer event", "description" : "

The Create Offer Event API records user interactions with an offer for tracking and analytics purposes.\nUse this API to log user-triggered engagement events such as:

Note: System-driven events like accepted and fulfilled are captured automatically by the growth system through fulfillment workflows. You do not need to post these.

", "operationId" : "create_an_offer_event", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "personalized_offer_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the personalized offer the event pertains to.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The type of engagement event to be recorded.\n\\* dismissed -\n\nLogged when the user closes or ignores the offer without accepting\n\\* viewed -\n\nLogged when the user's UI renders or displays the offer\n", "enum" : [ "viewed", "dismissed" ], "example" : null } }, "required" : [ "personalized_offer_id", "type" ], "example" : null }, "encoding" : { } } } }, "responses" : { "204" : { "description" : "No Content" }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ], "servers" : [ { "url" : "{protocol}://{site}.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } }, { "url" : "{protocol}://{site}-test.grow.{environment}:{port}/api/v2", "variables" : { "protocol" : { "default" : "https", "enum" : [ "http", "https" ] }, "site" : { "default" : "demo" }, "environment" : { "default" : "chargebee.com", "enum" : [ "chargebee.com" ] }, "port" : { "default" : "443", "enum" : [ "443", "8080" ] } } } ] } }, "/webhook_endpoints/{webhook-endpoint-id}/delete" : { "post" : { "summary" : "Delete a webhook endpoint", "description" : "Deletes a webhook endpoint using its unique identifier. Use this API to remove obsolete or inactive webhook endpoints from your Chargebee site. Deleting an endpoint ensures it no longer receives event notifications.\n", "operationId" : "delete_a_webhook_endpoint", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "webhook-endpoint-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/webhook-endpoint-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "webhook_endpoint" : { "$ref" : "#/components/schemas/WebhookEndpoint", "description" : "

The webhook_endpoint\nresource object that contains the configuration and details of the created webhook.

" } }, "required" : [ "webhook_endpoint" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/webhook_endpoints/{webhook-endpoint-id}" : { "get" : { "summary" : "Retrieve a webhook endpoint", "description" : "Retrieves the details of a specific webhook endpoint using its unique identifier. Use this API to inspect an endpoint's configuration, such as the target URL, subscribed events, and authentication settings.\n", "operationId" : "retrieve_a_webhook_endpoint", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "webhook-endpoint-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/webhook-endpoint-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "webhook_endpoint" : { "$ref" : "#/components/schemas/WebhookEndpoint", "description" : "

The webhook_endpoint\nresource object that contains the configuration and details of the created webhook.

" } }, "required" : [ "webhook_endpoint" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 webhook endpoint", "description" : "Updates the configuration of an existing webhook endpoint using its unique identifier. You can use this API to change properties such as the name, URL, subscribed events, authentication credentials, or API version. This is useful when rotating endpoints, updating destination URLs, or modifying which events your system listens to.\n", "operationId" : "update_a_webhook_endpoint", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "webhook-endpoint-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/webhook-endpoint-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "A name to identify the webhook endpoint.\n", "maxLength" : 50, "example" : null }, "api_version" : { "type" : "string", "default" : "v2", "deprecated" : false, "description" : "The API version used to format the webhook payload. Ensure this version matches the client library used by your webhook server.\n\\* v1 -\n\nIf selected, the payload includes only attributes from API v1 resources.\n\\* v2 -\n\nIf selected, the payload includes only attributes from API v2 resources.\n", "enum" : [ "v1", "v2" ], "example" : null }, "url" : { "type" : "string", "deprecated" : false, "description" : "

The target URL where webhook notifications will be sent.

\n

Note\nOnly URL ports 80, 443, 8080, or 8443 are allowed.

", "maxLength" : 512, "example" : null }, "primary_url" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Controls whether card-related resources are included in the webhook payload. Card details are always masked.\n", "example" : null }, "send_card_resource" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether card-related resources should be included in the webhook payload.\n", "example" : null }, "basic_auth_password" : { "type" : "string", "deprecated" : false, "description" : "The password used for basic authentication to secure webhook delivery.\n", "maxLength" : 250, "example" : null }, "basic_auth_username" : { "type" : "string", "deprecated" : false, "description" : "Username for basic authentication used to secure webhook delivery.\n", "maxLength" : 250, "example" : null }, "disabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Indicates whether the webhook endpoint is disabled. Set to true\nto disable the endpoint, set to false\nto enable the endpoint.

", "example" : null }, "enabled_events" : { "type" : "array", "deprecated" : false, "description" : "A list of event types that trigger this webhook. \n**Note**\nIf this field is left empty, the webhook will enable [all event types](/docs/api/webhook_endpoints) by default.\n", "items" : { "type" : "string", "deprecated" : false, "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "webhook_endpoint" : { "$ref" : "#/components/schemas/WebhookEndpoint", "description" : "

The webhook_endpoint\nresource object that contains the configuration and details of the created webhook.

" } }, "required" : [ "webhook_endpoint" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/webhook_endpoints" : { "get" : { "summary" : "List webhook endpoints", "description" : "Retrieves all webhook endpoints configured on your Chargebee site. The response includes each endpoint's ID, name, and target URL. Use this API to view, audit, or manage the list of webhook endpoints currently active or configured in your site.\n", "operationId" : "list_webhook_endpoints", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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])?[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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "webhook_endpoint" : { "$ref" : "#/components/schemas/WebhookEndpoint", "description" : "Resource object representing webhook_endpoint" } }, "required" : [ "webhook_endpoint" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 webhook endpoint", "description" : "Create a new webhook API endpoint on your Chargebee Site.\n", "operationId" : "create_a_webhook_endpoint", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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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,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "A name to identify the webhook endpoint.\n", "maxLength" : 50, "example" : null }, "api_version" : { "type" : "string", "default" : "v2", "deprecated" : false, "description" : "The API version used to format the webhook payload. Ensure this version matches the client library used by your webhook server\n\\* v1 -\n\nIf selected, the payload includes only attributes from API v1 resources.\n\\* v2 -\n\nIf selected, the payload includes only attributes from API v2 resources.\n", "enum" : [ "v1", "v2" ], "example" : null }, "url" : { "type" : "string", "deprecated" : false, "description" : "

The target URL where webhook notifications will be sent.

\n

Note\nOnly URL ports 80, 443, 8080, or 8443 are allowed.

", "maxLength" : 512, "example" : null }, "primary_url" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether this webhook is marked as the primary endpoint. If only one exists, it is primary by default.\n", "example" : null }, "disabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Indicates whether the webhook endpoint is disabled. Set to true\nto disable the endpoint, set to false\nto enable the endpoint.

", "example" : null }, "basic_auth_password" : { "type" : "string", "deprecated" : false, "description" : "The password used for basic authentication to secure webhook delivery.\n", "maxLength" : 250, "example" : null }, "basic_auth_username" : { "type" : "string", "deprecated" : false, "description" : "Username for basic authentication used to secure webhook delivery.\n", "maxLength" : 250, "example" : null }, "send_card_resource" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Controls whether card-related resources are included in the webhook payload. Card details are always masked.\n", "example" : null }, "chargebee_response_schema_type" : { "type" : "string", "deprecated" : false, "description" : "

Indicates the response schema used in the webhook payload, based on the product catalog version configured for the site.

\n

Note\nThis field is only applicable if the site is in compat mode.

\n* compat -

The webhook payload uses a schema compatible with both Product Catalog 1.0 and 2.0. This is applicable only to sites automatically upgraded to Product Catalog 2.0.

\n* plans_addons -

The webhook payload follows the Product Catalog 1.0\nschema and uses the Plans\nand Addons\nmodel.

\n* items -

The webhook payload follows the Product Catalog 2.0\nschema and uses the Items API model\n.

", "enum" : [ "plans_addons", "items", "compat" ], "example" : null }, "enabled_events" : { "type" : "array", "deprecated" : false, "description" : "A list of event types that trigger this webhook. \n**Note**\nIf this field is left empty, the webhook will enable [all event types](/docs/api/webhook_endpoints) by default.\n", "items" : { "type" : "string", "deprecated" : false, "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "example" : null } }, "required" : [ "name", "url" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "webhook_endpoint" : { "$ref" : "#/components/schemas/WebhookEndpoint", "description" : "

The webhook_endpoint\nresource object that contains the configuration and details of the created webhook.

" } }, "required" : [ "webhook_endpoint" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/usage_summary" : { "get" : { "summary" : "Retrieve usage summary for a subscription", "description" : "

Retrieves aggregated usage data for a metered feature in a subscription over a specified reporting window.

Unlike Retrieve Current Usage Charges for a Subscription API, which returns the current unbilled usage snapshot including charges, this endpoint returns aggregated usage for a requested timeframe.

Use this endpoint to power experiences such as:

What this endpoint returns

Returns usage summary entries for the requested feature within the specified timeframe.

If timeframe_start and timeframe_end are not provided, the reporting range defaults to the start of the subscription's current term for timeframe_start and the current time for timeframe_end.

How aggregation works

Aggregation windows begin at timeframe_start and continue consecutively until timeframe_end.

The usages in the window will be bucketed into rolling windows aligned to timeframe_start, not to calendar boundaries.

Example

If:

The response returns windows such as:

and continues in the same pattern until the final window:

If you need calendar-aligned reporting, set timeframe_start to the required boundary. For example, use 00:00:00 UTC for daily reporting aligned to calendar days, or the first day of the month at 00:00:00 UTC for monthly reporting aligned to calendar months.

Each aggregation window follows inclusive-exclusive semantics:

In other words, each window is represented as aggregated_from and aggregated_till.

This means:

These inclusive-exclusive boundaries ensure that windows do not overlap and that events on boundaries are never double-counted.

Distinct-count behavior

If a feature uses distinct-count aggregation, the distinct count is evaluated separately within each returned window.

This means the same entity can be counted once in multiple windows if it appears in each of them.

Example

If the same user appears in both:

That user is counted once in the Jan 1 aggregate and once in the Jan 2 aggregate.

", "operationId" : "retrieve_usage_summary_for_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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,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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "

Determines your position in the list for pagination. To ensure that the next page is retrieved correctly,\nalways set offset to the value of next_offset obtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "feature_id", "in" : "query", "description" : "Unique identifier of the metered [feature](/docs/api/features/feature-object#id)\nfor which usage is aggregated\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, { "name" : "window_size", "in" : "query", "description" : "Specifies the aggregation interval for the reporting window. If omitted,\nthe response includes a single aggregate for the entire reporting window.\n\\* day -\n\nAggregates usage by day.\n\\* minute -\n\nAggregates usage by minute.\n\\* hour -\n\nAggregates usage by hour.\n\\* month -\n\nAggregates usage by month.\n\\* week -\n\nAggregates usage by week.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "enum" : [ "month", "week", "day", "hour", "minute" ], "example" : null } }, { "name" : "timeframe_start", "in" : "query", "description" : "Start of the reporting window, in Unix epoch seconds. If not provided,\ndefaults to the start of the current subscription term.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, { "name" : "timeframe_end", "in" : "query", "description" : "End of the reporting window, in Unix epoch seconds. If not provided,\ndefaults to the current time\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "usage_summary" : { "$ref" : "#/components/schemas/UsageSummary", "description" : "Resource object representing usage_summary" } }, "required" : [ "usage_summary" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/usage_charges" : { "get" : { "summary" : "Retrieve usage charges for a subscription", "description" : "

Returns the current, unbilled usage charges for the metered features on a subscription.

This endpoint returns usage for each feature’s current usage period. If entitlement or pricing changes during that period, the same feature can appear multiple times, with one usage_charge object returned for each interval.

Use this endpoint to present the below information in your portal or customer-facing experiences.

This endpoint does not return historical, billed, or invoice-backed usage.

This endpoint returns usage for the active usage window of each feature, not necessarily for the full subscription term.

To read the response correctly, keep these three concepts in mind:

Read more about time concepts

1. Subscription current term

The subscription current term is the broader billing term of the subscription. It is usually determined by the lowest-frequency item on the subscription, typically the plan.

It is included as context only.

This endpoint does not return usage for the full subscription term unless that also happens to be the feature’s active usage window.

2. Current usage period

The current usage period is the time range in which usage is actively accruing and has not yet been billed for a feature.

This is the primary time window used by the API.

How it is determined

Feature with metered addon - The current usage period is the overage addon’s billing period.

Feature without metered addon - The current usage period is the currently active entitlement window for that feature.

3. Usage intervals

A current usage period may be returned as a single interval or as multiple intervals.

A usage interval is a continuous segment where the feature’s entitlement and pricing remain unchanged.

If nothing changes during the period, the API returns one entry for that feature.

If something changes, the API returns multiple entries for the same feature.

Changes that can create multiple intervals

    \n
  • Entitlement changes mid-period
  • \n
  • A metered addon is added, removed, or expires
  • \n
  • Overage pricing changes mid-period
  • \n
  • Pricing configuration changes during the active period
  • \n
Read more about example scenario

Example Scenario

    \n
  • Base Plan: Includes 100 GB/month (Starts 1 Jan).
  • \n
  • Mid-Period Change: Addon #1 (+200 GB/month) is added on 16 Jan 09:00:00
  • \n
  • Snapshot Date: API is called on 20 Jan.
  • \n

Current Usage Period: 1 Jan 00:00:00 – 31 Jan 23:59:59

Usage Interval 1: 1 Jan 00:00:00 – 16 Jan 08:59:59

This interval reflects the subscription’s state before the addon was active.

    \n
  • Entitlement: 100 GB (Base Plan)
  • \n
  • Usage: 80 GB consumed
  • \n
  • Carry-forward: The remaining 20 GB of the base plan is carried into the next interval.
  • \n

Usage Interval 2: 16 Jan 09:00:00 – 20 Jan 23:59:59

This interval begins the moment the entitlement context changes and ends at the response snapshot (20 Jan).

    \n
  • Entitlement: 220 GB total\n
      \n
    • Calculation: 20 GB (remaining from Base Plan) + 200 GB (Addon #1)
    • \n
    \n
  • \n
  • Usage: 100 GB consumed during this specific 4-day window.
  • \n
  • Note: Although the billing month ends on 31 Jan, the usage_to date is capped at the snapshot date (Jan 20).
  • \n
screenshot|/images/retrieve_usage_charges_for_subscription_1.png

Response Behaviour

The API returns separate usage charge objects for each interval where entitlement remains stable.

    \n
  1. \n

    First object - Initial Plan Period

    \n

    Covers the storage feature from 1 Jan 00:00:00 to 16 Jan 08:59:59.

    \n

    During this interval, total entitlement is 100 GB.

    \n

    80 GB is consumed, so 20 GB remains and carries forward into the next interval.

    \n
  2. \n
  3. \n

    Second object - Post-Addon Addition

    \n
      \n
    • Covers the storage feature from 16 Jan 09:00:00 to 20 Jan 23:59:59.
    • \n
    • During this interval, total entitlement is 220 GB, calculated as:\n
        \n
      • 200 GB from Addon #1
      • \n
      • 20 GB carried forward from the plan
      • \n
      \n
    • \n
    • 100 GB is consumed out of 220 GB; hence, no charges.
    • \n
    \n
  4. \n
Response for Jan 20
"list": [\n        "usage_charge": {\n            "subscription_id":"sub-001",\n            "feature_id": "storage_abc",\n            “usage_from”:"1 Jan 00:00:00", // For readability, the exact dates are shown here; the actual response will have timestamps.\n            “usage_to”:"16 Jan 08:59:59",\n            "included_usage": "100",\n            "total_usage": "80",\n            "on_demand_usage": "0",              \n            "amount": "0",\n            "metered_item_price_id":"storage_001"\n          },\n        "usage_charge": {\n            "subscription_id":"sub-001",\n            "feature_id": "storage_abc",\n            “usage_from”:"16 Jan 09:00:00",\n            “usage_to”:"20 Jan 23:59:59",\n            "included_usage": "220",\n            "total_usage": "100",\n            "on_demand_usage": "0",                  \n            "amount": "0",\n            "metered_item_price_id":"storage_001"\n          }\n  ]\n

Note: For readability, the example above uses dates such as 1 Jan and 16 Jan. In the actual API response, usage_from and usage_to are returned as timestamps.

Integration notes

When processing the response:

", "operationId" : "retrieve_usage_charges_for_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "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\nto the value of next_offset\nobtained in the previous iteration of the API call.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "feature_id", "in" : "query", "description" : "optional, string filter\n\nUnique identifier of the metered [feature](/docs/api/features/feature-object#id) for which usage is tracked.\n**Supported operators :**\nis\n\n**Example →**\n*feature_id\\[is\\] = \"fea-user-licenses\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "feat_123", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "usage_charge" : { "$ref" : "#/components/schemas/UsageCharge", "description" : "Resource object representing usage_charge" } }, "required" : [ "usage_charge" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/applicable_alerts" : { "get" : { "summary" : "List applicable alerts for a subscription", "description" : "

Returns the effective set of alert configurations for a given subscription. This includes global alerts (filtered by the subscription's plan) and any subscription-scoped alerts, giving you a single view of all threshold rules in force.

Use this endpoint when building subscription dashboards or evaluating which alerts apply to a specific customer.

Note: This endpoint returns alert configurations only. To check the runtime state (whether alerts are currently within_limit or in_alarm), use List alert statuses for a subscription.

", "operationId" : "list_applicable_alerts_for_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "optional, integer\n\nMaximum number of results to return.\n\n**Example →**\n*limit = 25*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "

optional, string

\n

Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nFilter by [status](/docs/api/alerts/alert-object#status).\n\n**Example →**\n*status\\[is\\] = \"enabled\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "description" : "\\* \\`enabled\\` - enabled \\* \\`disabled\\` - disabled\n", "enum" : [ "enabled", "disabled" ], "example" : null } }, "example" : null } }, { "name" : "type", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter by type. Supported values are usage_exceeded, spend_exceeded, and credit_balance_dropped.

\n

Example →\ntype[is] = "credit_balance_dropped"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "description" : "\\* \\`usage_exceeded\\` - usage_exceeded \\* \\`spend_exceeded\\` - spend_exceeded \\* \\`credit_balance_dropped\\` - credit_balance_dropped\n", "enum" : [ "usage_exceeded", "spend_exceeded", "credit_balance_dropped" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "alert" : { "$ref" : "#/components/schemas/Alert", "description" : "Resource object representing alert" } }, "required" : [ "alert" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "

Returned only if more results are available. Pass this value as offset in the next request to fetch the next page.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/alerts/{alert-id}" : { "get" : { "summary" : "Retrieve an alert", "description" : "

Retrieves a single alert configuration by alert_id. This returns the rule definition only and does not include runtime evaluation state.

Note: To check whether a subscription is currently within_limit or in_alarm for this alert, use List alert statuses for an alert.

", "operationId" : "retrieve_an_alert", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "alert-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/alert-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "alert" : { "$ref" : "#/components/schemas/Alert", "description" : "

Resource object representing alert.

" } }, "required" : [ "alert" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 alert", "description" : "

Updates an existing alert configuration. Use this to change the threshold values or toggle the status between enabled and disabled.

\n

Impacts

Alert status on threshold change

When the threshold is updated for an alert, the alarm_status for all impacted subscriptions is reset to within_limit. The alert is re-evaluated the next time Chargebee processes data relevant to that alert.

Alert status on disable

When the alert status is changed to disabled, all further evaluation stops. No webhooks are fired for this alert while it is disabled. When the alert is re-enabled, the alarm_status is set to within_limit and is re-evaluated when Chargebee next processes relevant data for the alert.

", "operationId" : "update_an_alert", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "alert-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/alert-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "status" : { "type" : "string", "default" : "enabled", "deprecated" : false, "description" : "

Set to enabled to activate the alert or disabled to deactivate it.

\n* enabled -

The alert is active and will trigger when the threshold is breached.

\n* disabled -

The alert is inactive and will not trigger.

", "enum" : [ "enabled", "disabled" ], "example" : null }, "threshold" : { "type" : "object", "deprecated" : false, "description" : "The threshold configuration that defines when this alert fires. Only the fields provided are updated.\n", "properties" : { "mode" : { "type" : "string", "deprecated" : false, "description" : "

How the threshold value is interpreted. usage_exceeded alerts support percentage or absolute. spend_exceeded and credit_balance_dropped alerts always use absolute.

\n* percentage -

The threshold value represents a percentage (0-100) of the plan or feature quota. Supported only for usage_exceeded alerts.

\n* absolute -

The threshold value represents an absolute quantity: a usage quantity for usage_exceeded, an overage spend amount in currency_code for spend_exceeded, or a credit-balance floor for credit_balance_dropped.

", "enum" : [ "absolute", "percentage" ], "example" : null }, "value" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "

The numeric threshold at which the alert fires. For percentage mode, this must be between 0 and 100 inclusive. For absolute mode, this must be >= 0.

", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "threshold" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "alert" : { "$ref" : "#/components/schemas/Alert", "description" : "

Resource object representing alert.

" } }, "required" : [ "alert" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/alerts/{alert-id}/delete" : { "post" : { "summary" : "Delete an alert", "description" : "

Deletes an alert configuration. Only subscription-scoped alerts can be deleted using this endpoint.

Important

This operation cannot delete global alerts. To stop a global alert from firing, update the alert and set status to disabled instead.

\n

Impacts

Alert configuration

The alert configuration is permanently deleted from the system and cannot be recovered.

Alert statuses

All alert statuses associated with this alert are removed. No further evaluation takes place, and no alert_status_changed webhooks are fired for this alert going forward.

", "operationId" : "delete_an_alert", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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?:[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "alert-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/alert-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "alert" : { "$ref" : "#/components/schemas/Alert", "description" : "

Resource object representing alert.

" } }, "required" : [ "alert" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/alerts" : { "get" : { "summary" : "List alerts", "description" : "Returns a list of alert configurations meeting **all** the conditions specified in the filter parameters below. Results include both global and subscription-scoped alerts. \n**Note:** To retrieve only the alerts that are in effect for a specific subscription (after resolving global rules and overrides), use [List applicable alerts](/docs/api/alerts/list-applicable-alerts-for-a-subscription) instead.\n", "operationId" : "list_alerts", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "optional, integer\n\nMaximum number of results to return.\n\n**Example →**\n*limit = 10*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "

optional, string

\n

Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.

\n

Example →\noffset = "MjAyNC0xMi0yMFQxMjozMjo1MSswMDowMHw5OTk5OTk5OTk="

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nFilter alerts by [id](/docs/api/alerts/alert-object#id).\n\n**Example →**\n*id\\[in\\] = \"alert___dev__3Nl7purV3LwbKYH\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } }, "example" : null } }, { "name" : "type", "in" : "query", "description" : "

optional, enumerated string filter

\n

Filter by type. Supported values are usage_exceeded, spend_exceeded, and credit_balance_dropped.

\n

Example →\ntype[is] = "credit_balance_dropped"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "description" : "\\* \\`usage_exceeded\\` - usage_exceeded \\* \\`spend_exceeded\\` - spend_exceeded \\* \\`credit_balance_dropped\\` - credit_balance_dropped\n", "enum" : [ "usage_exceeded", "spend_exceeded", "credit_balance_dropped" ], "example" : null } }, "example" : null } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nFilter by [subscription_id](/docs/api/alerts/alert-object#subscription_id) to find alerts scoped to a specific subscription.\n\n**Example →**\n*subscription_id\\[is\\] = \"sub_KyV2S7Qm8tL7p\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nFilter by [status](/docs/api/alerts/alert-object#status).\n\n**Example →**\n*status\\[is\\] = \"enabled\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "description" : "\\* \\`enabled\\` - enabled \\* \\`disabled\\` - disabled\n", "enum" : [ "enabled", "disabled" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "alert" : { "$ref" : "#/components/schemas/Alert", "description" : "Resource object representing alert" } }, "required" : [ "alert" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "

Returned only if more results are available. Pass this value as offset in the next request to fetch the next page.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 alert", "description" : "

Creates a new alert configuration. Depending on type, the alert can monitor usage, spend, or credit balance, and it can be global or subscription-scoped depending on whether subscription_id is provided.

Note: Creating an alert defines the threshold rule only. After an alert is created, Chargebee begins evaluating it as relevant billing data changes are processed. Alert statuses are created and updated during alert evaluation. The runtime evaluation state for each subscription is available via the Alert Status endpoints.

\n

Prerequisites & Constraints

\n

Use Cases

Create a usage alert

Set type to usage_exceeded and provide metered_feature_id. Use a percentage threshold to fire relative to the plan or feature quota (for example, at 90%), or an absolute threshold to fire at a specific usage quantity.

Create a spend alert

Set type to spend_exceeded and provide currency_code. The alert monitors the usage-based spend accumulated from metered addons (counting only usage beyond the included entitlement) and fires when it reaches the absolute threshold amount in that currency.

Create a credit balance alert

Set type to credit_balance_dropped and provide unit_id. The alert fires when the credit balance for that unit drops to or below the absolute threshold.

", "operationId" : "create_an_alert", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of alert to create. Determines what the alert measures, which input it requires, and how the threshold is interpreted.

\n* credit_balance_dropped -

The alert fires when the credit balance for the configured credit unit drops to or below the configured threshold. The threshold mode is always absolute.

\n* usage_exceeded -

The alert fires when usage of the metered feature (identified by metered_feature_id) reaches or exceeds the configured threshold. Supports both percentage and absolute threshold modes.

\n* spend_exceeded -

The alert fires when the total usage-based spend accumulated from metered addons reaches or exceeds the configured threshold. Only spend from usage beyond the included entitlement is counted. See usage charges for how overage spend is computed. The threshold mode is always absolute.

", "enum" : [ "usage_exceeded", "spend_exceeded", "credit_balance_dropped" ], "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A human-readable name for the alert. Maximum 50 characters.\n", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "An optional description providing additional context about the alert. Maximum 65,000 characters.\n", "maxLength" : 65000, "example" : null }, "metered_feature_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the metered feature that the alert should monitor. Required when type is usage_exceeded; do not set it for other alert types.

", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO currency code in which the metered-addon overage spend is measured. Required when type is spend_exceeded; do not set it for other alert types.

", "maxLength" : 3, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit that the alert should monitor. Required when type is credit_balance_dropped; do not set it for other alert types.

", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the subscription to scope this alert to. If omitted, the alert is created as a global alert. If provided, filter_conditions must not be set.

", "maxLength" : 50, "example" : null }, "meta" : { "type" : "string", "deprecated" : false, "description" : "An optional string field for storing custom metadata with the alert (for example, JSON serialized by your integration). Maximum 65,000 characters.\n", "maxLength" : 65000, "example" : null }, "threshold" : { "type" : "object", "deprecated" : false, "description" : "The threshold configuration that defines when this alert fires.\n", "properties" : { "mode" : { "type" : "string", "deprecated" : false, "description" : "

How the threshold value is interpreted. usage_exceeded alerts support percentage or absolute. For spend_exceeded alerts, mode is optional and defaults to absolute when omitted; if provided, it must be absolute. For credit_balance_dropped alerts, mode must be absolute.

\n* percentage -

The threshold value represents a percentage (0-100) of the plan or feature quota. Supported only for usage_exceeded alerts.

\n* absolute -

The threshold value represents an absolute quantity: a usage quantity for usage_exceeded, an overage spend amount for spend_exceeded, or a credit-balance floor for credit_balance_dropped. For spend_exceeded, the amount is expressed in the major units of currency_code (for example, dollars—not cents—for USD, so 500.0 means 500 USD).

", "enum" : [ "absolute", "percentage" ], "example" : null }, "value" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "

The numeric threshold at which the alert fires. For percentage mode, this must be between 0 and 100 inclusive. For absolute mode, this must be >= 0.

", "example" : null } }, "required" : [ "value" ], "example" : null }, "filter_conditions" : { "type" : "object", "deprecated" : false, "description" : "

An array of conditions that restrict which subscriptions a global alert applies to. Multiple conditions are evaluated with OR logic. Cannot be set when subscription_id is provided.

", "properties" : { "field" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The subscription attribute to filter on. Currently only plan_price_id is supported.

\n* plan_price_id -

Filters by the plan price associated with the subscription.

", "enum" : [ "plan_price_id" ], "example" : null }, "example" : null }, "operator" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "

The comparison operator for the filter condition.

\n* not_equals -

The subscription attribute must not equal the specified value.

\n* equals -

The subscription attribute must equal the specified value.

", "enum" : [ "equals", "not_equals" ], "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "The value to compare against, for example, a specific plan price identifier. Maximum 50 characters.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "name", "type" ], "example" : null }, "encoding" : { "filter_conditions" : { "style" : "deepObject", "explode" : true }, "threshold" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "alert" : { "$ref" : "#/components/schemas/Alert", "description" : "

Resource object representing alert.

" } }, "required" : [ "alert" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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}/alert_statuses" : { "get" : { "summary" : "List alert statuses for a subscription", "description" : "

Returns the runtime state of all alerts for a given subscription. Each entry in the response indicates whether the subscription is within_limit or in_alarm for a specific alert.

Use this endpoint to build a subscription-level dashboard showing which thresholds have been breached and when.

Note: This endpoint returns runtime state, not alert configurations. To retrieve the alert rules that apply to a subscription, use List applicable alerts.

", "operationId" : "list_alert_statuses_for_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "optional, integer\n\nMaximum number of results to return.\n\n**Example →**\n*limit = 10*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "

optional, string

\n

Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "alarm_status", "in" : "query", "description" : "optional, enumerated string filter\n\nFilter by [alarm_status](/docs/api/alert_statuses/alert-status-object#alarm_status) to find alerts in a specific runtime state.\n\n**Example →**\n*alarm_status\\[is\\] = \"in_alarm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "description" : "\\* \\`within_limit\\` - WITHIN_LIMIT \\* \\`in_alarm\\` - IN_ALARM\n", "enum" : [ "within_limit", "in_alarm" ], "example" : null } }, "example" : null } }, { "name" : "alert_id", "in" : "query", "description" : "optional, string filter\n\nFilter by [alert_id](/docs/api/alert_statuses/alert-status-object#alert_id) to find the status for a specific alert.\n\n**Example →**\n*alert_id\\[is\\] = \"alert___dev__3Nl7purV3LwbKYH\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "alert_status" : { "$ref" : "#/components/schemas/AlertStatus", "description" : "Resource object representing alert_status" } }, "required" : [ "alert_status" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "

Returned only if more results are available. Pass this value as offset in the next request to fetch the next page.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/alerts/{alert-id}/alert_statuses" : { "get" : { "summary" : "List alert statuses for an alert", "description" : "

Returns the runtime state of a specific alert across all impacted subscriptions. Each entry indicates whether a subscription is within_limit or in_alarm for the given alert.

Use this endpoint to monitor which subscriptions are currently breaching a threshold, for example when building internal dashboards or CSM workflows.

\n

Prerequisites & Constraints

", "operationId" : "list_alert_statuses_for_an_alert", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "alert-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/alert-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "optional, integer\n\nMaximum number of results to return.\n\n**Example →**\n*limit = 25*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "

optional, string

\n

Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "alarm_status", "in" : "query", "description" : "optional, enumerated string filter\n\nFilter by [alarm_status](/docs/api/alert_statuses/alert-status-object#alarm_status) to find subscriptions in a specific runtime state.\n\n**Example →**\n*alarm_status\\[is\\] = \"in_alarm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "description" : "\\* \\`within_limit\\` - WITHIN_LIMIT \\* \\`in_alarm\\` - IN_ALARM\n", "enum" : [ "within_limit", "in_alarm" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "alert_status" : { "$ref" : "#/components/schemas/AlertStatus", "description" : "Resource object representing alert_status" } }, "required" : [ "alert_status" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "

Returned only if more results are available. Pass this value as offset in the next request to fetch the next page.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ledger_account_balances" : { "get" : { "summary" : "List ledger account balances", "description" : "

Returns a paginated list of real-time credit balance snapshots for a subscription. Each item in the list is a ledger_account_balance object, identified by a unique combination of subscription_id, unit_id, unit_type.

", "operationId" : "list_ledger_account_balances", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2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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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "Specifies the maximum number of resources to return per page. \n**Default and Hard Cap**\n\n* Optional parameter; if omitted, a server-defined default is applied.\n* Values exceeding the server's maximum limit are capped (clamped) to the allowed maximum.\n\n**Example →**\n*limit = \"50\"*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "

Opaque cursor indicating the current position in the result set for pagination.

\n

Behavior

\n

Example →\noffset = "["1771176208000","96000000006"]"

", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "subscription_id", "in" : "query", "description" : "required, string filter\n\nFilters results by subscription identifier. This is the subscription whose credit grant balances you are listing.\n\n**Supported operators :** is\n\n**Example →**\n*subscription_id\\[is\\] = \"1mGETgZVF2umUZq\"*\n", "required" : true, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "unit_id", "in" : "query", "description" : "

optional, string filter

\n

Filters results by unit identifier. For example, a credit unit id such as ai_credits.

\n

Supported operators : is

\n

Example →\nunit_id[is] = "ai_credits"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "ledger_account_balance" : { "$ref" : "#/components/schemas/LedgerAccountBalance", "description" : "Resource object representing ledger_account_balance" } }, "required" : [ "ledger_account_balance" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ledger_operations/release_authorization" : { "post" : { "summary" : "Release authorization", "description" : "

The release_authorization operation releases previously held credits back to the usable balance, effectively canceling an existing authorization (hold).

API Behavior

Requirements

Requires the authorization_id of the original authorize request.

Business Use Cases

Cancellation flows\nWhen an authorized action is no longer needed.

Failure recovery\nDownstream processing fails after authorization.

Timeout handling\nManual alternative to auto-release on hold expiry.

Usage

Ensures held credits are fully returned to the usable balance, preventing funds from remaining locked.

The response returns the created ledger_operation, the updated ledger_account_balance, the affected grant_blocks, and the ledger_entries recorded by this operation.

", "operationId" : "release_authorization", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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,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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "authorization_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the original authorize operation whose hold is being released.

\n

Behavior

", "maxLength" : 50, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Optional client-supplied identifier for this release_authorization operation. \n**Behavior**\n\n* When provided, must uniquely identify this operation across the entire ledger.\n* Should not conflict with any other operation, regardless of type.\n", "maxLength" : 50, "example" : null }, "ledger_operation_timestamp" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Unix timestamp (in seconds) representing when the release_authorization occurred in the upstream system.

\n

Usage

\n

Note

Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.

", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Optional opaque JSON object carrying additional business context. \\*\\*Behavior\\*\\* \\* Stored as-is and returned verbatim by the system. \\* Not interpreted, validated, or indexed by the system.\n", "example" : null } }, "required" : [ "authorization_id", "ledger_operation_timestamp" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ledger_operation" : { "$ref" : "#/components/schemas/LedgerOperation", "description" : "

The resulting ledger_operation resource for this capture_authorization.

" }, "ledger_account_balance" : { "$ref" : "#/components/schemas/LedgerAccountBalance", "description" : "

Summarized real-time ledger_account_balance after this capture_authorization.

" }, "grant_blocks" : { "type" : "array", "description" : "

The grant_blocks affected by this operation, each reflecting its updated balances after the operation.

", "items" : { "$ref" : "#/components/schemas/GrantBlock", "description" : "Resource object representing grant_block" }, "example" : null }, "ledger_entries" : { "type" : "array", "description" : "

The ledger_entries recorded by this operation — immutable, per-grant-block movements (typically debit, and unhold when releasing any unused hold) that make up this capture_authorization.

", "items" : { "$ref" : "#/components/schemas/LedgerEntry", "description" : "Resource object representing ledger_entry" }, "example" : null } }, "required" : [ "grant_blocks", "ledger_account_balance", "ledger_entries", "ledger_operation" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ledger_operations/capture" : { "post" : { "summary" : "Capture", "description" : "

The capture operation immediately consumes credits for a completed action.

Behavior

Usage

Ideal for simple, immediate consumption scenarios where there is no need for multi-step confirmation or concurrency control.

The response returns the created ledger_operation, the updated ledger_account_balance, the affected grant_blocks, and the ledger_entries recorded by this operation.

", "operationId" : "capture", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Optional client-supplied identifier for this capture operation. \n**Behavior**\n\n* When provided, must uniquely identify this operation across the entire ledger.\n* Should not conflict with any other operation, regardless of type.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) against which credit grants are tracked.\n", "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit for which credit grants are tracked. For example, a credit unit id such as ai_credits.

", "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "description" : "

The number of credits to immediately consume from the usable balance.\nPass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Behavior

Credits are directly moved from usable → consumed as part of this operation.

\n

Constraints

\n

Example

If amount = "50", then 50 credits are immediately deducted from the usable balance and recorded as consumed.

", "maxLength" : 36, "example" : null }, "ledger_operation_timestamp" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Unix timestamp (in seconds) representing when the business operation occurred in the upstream system.

\n

Usage

Used for period attribution, grace-period eligibility, and reporting accuracy.

\n

Note

Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.

", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Optional opaque JSON object carrying additional business context \\*\\*Behavior\\*\\* \\* Stored as-is and returned verbatim by the system. \\* Not interpreted, validated, or indexed by the system.\n", "example" : null } }, "required" : [ "amount", "ledger_operation_timestamp", "subscription_id", "unit_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ledger_operation" : { "$ref" : "#/components/schemas/LedgerOperation", "description" : "

The resulting ledger_operation resource for this capture_authorization.

" }, "ledger_account_balance" : { "$ref" : "#/components/schemas/LedgerAccountBalance", "description" : "

Summarized real-time ledger_account_balance after this capture_authorization.

" }, "grant_blocks" : { "type" : "array", "description" : "

The grant_blocks affected by this operation, each reflecting its updated balances after the operation.

", "items" : { "$ref" : "#/components/schemas/GrantBlock", "description" : "Resource object representing grant_block" }, "example" : null }, "ledger_entries" : { "type" : "array", "description" : "

The ledger_entries recorded by this operation — immutable, per-grant-block movements (typically debit, and unhold when releasing any unused hold) that make up this capture_authorization.

", "items" : { "$ref" : "#/components/schemas/LedgerEntry", "description" : "Resource object representing ledger_entry" }, "example" : null } }, "required" : [ "grant_blocks", "ledger_account_balance", "ledger_entries", "ledger_operation" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ledger_operations/allocate" : { "post" : { "summary" : "Allocate", "description" : "

The allocate operation allocates credit grants to a subscription's provisioned balance.

Behavior

Usage

Use this operation to allocate ad-hoc credit grants to a subscription — for example, to reward subscribers with bonus credit grants or compensate for service disruptions.

The response returns the created ledger_operations, the updated ledger_account_balance, the created grant_blocks, and the ledger_entries recorded by this operation.

", "operationId" : "allocate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) to which the allocated credit grants are applied.\n", "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit for which credit grants are allocated. For example, a credit unit id such as ai_credits.

", "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "description" : "

The number of credit grants to allocate as part of this operation.\nPass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Behavior

\n

Example

If amount = "500", then 500 credit grants are added to the subscription's total as well as usable balance and recorded as a new grant block.

", "maxLength" : 36, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Unix timestamp (in seconds) at which the allocated credit grants expire and become unavailable for consumption.

\n

Behavior

\n

Constraints

", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Optional opaque JSON object carrying additional business context for this allocation. \\*\\*Behavior\\*\\* \\* Stored as-is and returned verbatim by the system. \\* Not interpreted, validated, or indexed by the system.\n", "example" : null } }, "required" : [ "amount", "expires_at", "subscription_id", "unit_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ledger_account_balance" : { "$ref" : "#/components/schemas/LedgerAccountBalance", "description" : "

Summarized real-time ledger_account_balance after this capture_authorization.

" }, "ledger_operations" : { "type" : "array", "description" : "

The resulting ledger_operations resource for this allocate operation. Has type allocation and reflects the movement of credit grants into the subscription's provisioned balance.

", "items" : { "$ref" : "#/components/schemas/LedgerOperation", "description" : "Resource object representing ledger_operation" }, "example" : null }, "grant_blocks" : { "type" : "array", "description" : "

The grant_blocks created for this allocation, each tracking the issued credit grants, remaining balance, holds, expiry, and rollover state for the subscription.

", "items" : { "$ref" : "#/components/schemas/GrantBlock", "description" : "Resource object representing grant_block" }, "example" : null }, "ledger_entries" : { "type" : "array", "description" : "

The ledger_entries recorded by this operation — immutable, per-grant-block movements of type credit that make up this allocation.

", "items" : { "$ref" : "#/components/schemas/LedgerEntry", "description" : "Resource object representing ledger_entry" }, "example" : null } }, "required" : [ "grant_blocks", "ledger_account_balance", "ledger_entries", "ledger_operations" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ledger_operations/authorize" : { "post" : { "summary" : "Authorize", "description" : "

Reserves credit grants at the time of request for later finalization via capture_authorization or release_authorization.

Use this operation when the upstream system requires a strict balance check before finalizing consumption. Credits are moved to a held state immediately, preventing concurrent operations from spending the same credits.

API Behavior

Reserved Credits Behavior

Use Cases

Two-step workflows\nSupports "check now, finalize later" flows.

The response returns the created ledger_operation, the updated ledger_account_balance, the affected grant_blocks, and the ledger_entries recorded by this operation.

", "operationId" : "authorize", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Optional client-supplied identifier for this authorize operation.

\n

Behavior

\n

Usage

", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) against which credit grants are tracked.\n", "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit for which credit grants are tracked. For example, a credit unit id such as ai_credits.

", "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "description" : "

The number of credit grants to reserve from the usable balance. While held, this amount is unavailable for other operations, helping prevent concurrent requests from spending the same credits.\nPass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Behavior

\n

Example

If amount = "50", the ledger reserves 50 credits immediately, if available. A later capture_authorization can consume all or part of that hold. Any unused remainder is released back to the usable balance.

", "maxLength" : 36, "example" : null }, "ledger_operation_timestamp" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Unix timestamp (in seconds) representing when the business operation occurred in the upstream system.

\n

Usage

Used for period attribution, grace-period eligibility, and reporting accuracy.

\n

Note

Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.

\n

Constraints

", "example" : null }, "auto_release_timestamp" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when an unfinalized hold will be automatically released back to the usable balance. \n**Behavior**\n\n* Applies only to authorize operations.\n* If not explicitly provided, the system assigns a default expiry. Defaults to approximately 10 minutes after the authorize request is processed. \n**Usage**\n\nEnsures held credits are not locked indefinitely by abandoned or unfinalized authorizations. \n**Note**\n\n* By default, the value reflects what is provided in the request.\n* If the specified timestamp exceeds the end of the block's grace period, it is adjusted (clamped) to the grace period end and returned in the response.\n", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Optional opaque JSON object carrying additional business context \\*\\*Behavior\\*\\* \\* Stored as-is and returned verbatim by the system. \\* Not interpreted, validated, or indexed by the system.\n", "example" : null } }, "required" : [ "amount", "ledger_operation_timestamp", "subscription_id", "unit_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ledger_operation" : { "$ref" : "#/components/schemas/LedgerOperation", "description" : "

The resulting ledger_operation resource for this capture_authorization.

" }, "ledger_account_balance" : { "$ref" : "#/components/schemas/LedgerAccountBalance", "description" : "

Summarized real-time ledger_account_balance after this capture_authorization.

" }, "grant_blocks" : { "type" : "array", "description" : "

The grant_blocks affected by this operation, each reflecting its updated balances after the operation.

", "items" : { "$ref" : "#/components/schemas/GrantBlock", "description" : "Resource object representing grant_block" }, "example" : null }, "ledger_entries" : { "type" : "array", "description" : "

The ledger_entries recorded by this operation — immutable, per-grant-block movements (typically debit, and unhold when releasing any unused hold) that make up this capture_authorization.

", "items" : { "$ref" : "#/components/schemas/LedgerEntry", "description" : "Resource object representing ledger_entry" }, "example" : null } }, "required" : [ "grant_blocks", "ledger_account_balance", "ledger_entries", "ledger_operation" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ledger_operations" : { "get" : { "summary" : "List ledger operations", "description" : "Returns a list of operations meeting all the conditions specified in the filter parameters below.\n", "operationId" : "list_ledger_operations", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-9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(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "Specifies the maximum number of resources to return per page. \\*\\*Default and Hard Cap\\*\\* \\* Optional parameter; if omitted, a server-defined default is applied. \\* Values exceeding the server's maximum limit are capped (clamped) to the allowed maximum. \\*\\*Example →\\*\\* \\*limit = \"50\"\\*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "Opaque cursor indicating the current position in the result set for pagination. \n**Behavior**\n\n* To fetch the next page, pass the next_offset value returned in the previous response.\n* The value is opaque and must not be parsed, modified, or constructed manually.\n\n**Example →**\n*offset = \"\\[\"1771176208000\",\"96000000006\"\\]\"*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "subscription_id", "in" : "query", "description" : "required, string filter\n\nFilters results by subscription identifier. This is the subscription whose operations you are listing.\n\n**Supported operators :** is\n\n**Example →**\n*subscription_id\\[is\\] = \"1mGETgZVF2umUZq\"*\n", "required" : true, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "unit_id", "in" : "query", "description" : "

optional, string filter

\n

Filters results by unit identifier. For example, a credit unit id such as ai_credits.

\n

Supported operators : is

\n

Example →\nunit_id[is] = "ai_credits"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "created_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter by when the operation was recorded (created_at).

\n

Supported operators : after, before, on, between (per List\noperations).

\n

Example →\ncreated_at[between] = "[1771175750, 1771175800]"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } }, "example" : null } }, { "name" : "type", "in" : "query", "description" : "optional, string filter\n\nFilters results by operation type.\n\n**Supported operators :** is, in\n\n**Example →**\n*type\\[is\\] = \"capture\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "in" : { "type" : "string", "description" : "\\* \\`allocation\\` - Allocation Operation \\* \\`capture\\` - Capture Operation \\* \\`authorize\\` - Authorization Operation \\* \\`release_authorization\\` - Release Authorization Operation \\* \\`capture_authorization\\` - Capture Authorization Operation \\* \\`expiry\\` - Expiry Operation \\* \\`void\\` - Void Operation \\* \\`rollover\\` - Rollover Operation \\* \\`adjustment\\` - Overdraft Adjustment Operation\n", "enum" : [ "allocation", "capture", "authorize", "release_authorization", "capture_authorization", "expiry", "void", "rollover", "adjustment" ], "pattern" : "^\\[(allocation|capture|authorize|release_authorization|capture_authorization|expiry|void|rollover|adjustment)(,(allocation|capture|authorize|release_authorization|capture_authorization|expiry|void|rollover|adjustment))*\\]$", "example" : null }, "is" : { "type" : "string", "description" : "\\* \\`allocation\\` - Allocation Operation \\* \\`capture\\` - Capture Operation \\* \\`authorize\\` - Authorization Operation \\* \\`release_authorization\\` - Release Authorization Operation \\* \\`capture_authorization\\` - Capture Authorization Operation \\* \\`expiry\\` - Expiry Operation \\* \\`void\\` - Void Operation \\* \\`rollover\\` - Rollover Operation \\* \\`adjustment\\` - Overdraft Adjustment Operation\n", "enum" : [ "allocation", "capture", "authorize", "release_authorization", "capture_authorization", "expiry", "void", "rollover", "adjustment" ], "example" : null } }, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "

optional, string filter

\n

Specifies the field used to sort the result set.

\n

Supported attributes

\n

Sort Order

\n

Example →\nsort_by[desc] = "created_at"

\n

This sorts operations by created_at in descending order (most recent first).

", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "ledger_operation" : { "$ref" : "#/components/schemas/LedgerOperation", "description" : "Resource object representing ledger_operation" } }, "required" : [ "ledger_operation" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ledger_operations/capture_authorization" : { "post" : { "summary" : "Capture authorization", "description" : "

The capture_authorization operation finalizes a previously created hold by converting reserved credits into consumed credits.

API Behavior

Requirement

Requires the authorization_id (i.e., the ledger_operation_id of the original authorize operation).

Note

The response returns the created ledger_operation, the updated ledger_account_balance, the affected grant_blocks, and the ledger_entries recorded by this operation.

", "operationId" : "capture_authorization", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "authorization_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the original authorize operation whose hold is being captured.

\n

Behavior

", "maxLength" : 50, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Optional client-supplied identifier for this capture_authorization operation. \n**Behavior**\n\n* When provided, must uniquely identify this operation across the entire ledger.\n* Should not conflict with any other operation, regardless of type.\n", "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "description" : "

The number of credits to finalize as consumption from a previously authorized (held) amount.\nPass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Behavior

\n

Constraints

Cannot exceed the total credits currently on hold for the authorization.

\n

Example

Step 1: Authorize (hold created): amount = "100" results in 100 credits moved from usable to held.

Step 2: Capture authorization (partial consumption): amount = "70" results in 70 credits moved from held to consumed; remaining 30 credits auto-released back to usable balance (via internal release operation)

\n

Ledger Effect Summary

", "maxLength" : 36, "example" : null }, "ledger_operation_timestamp" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Unix timestamp (in seconds) representing when the capture_authorization occurred in the upstream system.

\n

Usage

Used for period attribution, grace-period eligibility, and reporting accuracy.

\n

Note

Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.

", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Optional opaque JSON object carrying additional business context. \\*\\*Behavior\\*\\* \\* Stored as-is and returned verbatim by the system. \\* Not interpreted, validated, or indexed by the system.\n", "example" : null } }, "required" : [ "amount", "authorization_id", "ledger_operation_timestamp" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ledger_operation" : { "$ref" : "#/components/schemas/LedgerOperation", "description" : "

The resulting ledger_operation resource for this capture_authorization.

" }, "ledger_account_balance" : { "$ref" : "#/components/schemas/LedgerAccountBalance", "description" : "

Summarized real-time ledger_account_balance after this capture_authorization.

" }, "grant_blocks" : { "type" : "array", "description" : "

The grant_blocks affected by this operation, each reflecting its updated balances after the operation.

", "items" : { "$ref" : "#/components/schemas/GrantBlock", "description" : "Resource object representing grant_block" }, "example" : null }, "ledger_entries" : { "type" : "array", "description" : "

The ledger_entries recorded by this operation — immutable, per-grant-block movements (typically debit, and unhold when releasing any unused hold) that make up this capture_authorization.

", "items" : { "$ref" : "#/components/schemas/LedgerEntry", "description" : "Resource object representing ledger_entry" }, "example" : null } }, "required" : [ "grant_blocks", "ledger_account_balance", "ledger_entries", "ledger_operation" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/ledger_operations/{ledger-operation-id}" : { "get" : { "summary" : "Retrieve ledger operation", "description" : "Returns the details of a specific ledger operation by its unique identifier.\n", "operationId" : "retrieve_ledger_operation", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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-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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,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "ledger-operation-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/ledger-operation-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ledger_operation" : { "$ref" : "#/components/schemas/LedgerOperation", "description" : "

The ledger_operation resource matching the given id, containing the full\ndetails of the operation including its type, amount, balance snapshots (provisioned_start_balance,\nprovisioned_end_balance, overdraft_start_balance, overdraft_end_balance),\ntimestamps, and any associated metadata.

" } }, "required" : [ "ledger_operation" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/grant_blocks" : { "get" : { "summary" : "List grant blocks", "description" : "Returns a list of grant blocks meeting all the conditions specified in the filter parameters below.\n", "operationId" : "list_grant_blocks", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } }, { "name" : "limit", "in" : "query", "description" : "Specifies the maximum number of resources to return per page. \\*\\*Default and Hard Cap\\*\\* \\* Optional parameter; if omitted, a server-defined default is applied. \\* Values exceeding the server's maximum limit are capped (clamped) to the allowed maximum. \\*\\*Example →\\*\\* \\*limit = \"50\"\\*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "Opaque cursor indicating the current position in the result set for pagination. \n**Behavior**\n\n* To fetch the next page, pass the next_offset value returned in the previous response.\n* The value is opaque and must not be parsed, modified, or constructed manually.\n\n**Example →**\n*offset = \"\\[\"1771176208000\",\"96000000006\"\\]\"*\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.\n", "maxLength" : 1000, "example" : null } }, { "name" : "subscription_id", "in" : "query", "description" : "required, string filter\n\nFilters results by subscription identifier. This is the subscription whose grant blocks you are listing.\n\n**Supported operators :** is\n\n**Example →**\n*subscription_id\\[is\\] = \"1mGETgZVF2umUZq\"*\n", "required" : true, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "unit_id", "in" : "query", "description" : "

optional, string filter

\n

Filters results by unit identifier. For example, a credit unit id such as ai_credits.

\n

Supported operators : is

\n

Example →\nunit_id[is] = "ai_credits"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "account_type", "in" : "query", "description" : "optional, enum filter\n\nFilters results by the account the grant block belongs to: **provisioned** (plan-issued credits) or **overdraft** (consumption beyond configured grants).\n\n**Supported operators :** is\n\n**Example →**\n*account_type\\[is\\] = \"provisioned\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "description" : "\\* \\`provisioned\\` - provisioned \\* \\`overdraft\\` - overdraft\n", "enum" : [ "provisioned", "overdraft" ], "example" : null } }, "example" : null } }, { "name" : "effective_from", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter by when blocks become effective (effective_from).

\n

Supported operators : after, before, on, between (per\nList operations).

\n

Example →\neffective_from[after] = "1765283483"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } }, "example" : null } }, { "name" : "expires_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter by grant expiry (expires_at).

\n

Supported operators : after, before, on, between (per List\noperations).

\n

Example →\nexpires_at[before] = "2863729974"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } }, "example" : null } }, { "name" : "created_at", "in" : "query", "description" : "

optional, timestamp(UTC) in seconds filter

\n

Filter by when the grant block was persisted (created_at).

\n

Supported operators : after, before, on, between.

\n

Example →\ncreated_at[between] = "[1771175750, 1771175800]"

", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } }, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "

optional, string filter

\n

Specifies the field used to sort the result set.

\n

Supported attributes

\n

Sort Order

\n

Example →\nsort_by[desc] = "effective_from"

\n

This sorts grant blocks by effective_from in descending order (latest effective time first).

", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "effective_from", "expires_at", "created_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "effective_from", "expires_at", "created_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "grant_block" : { "$ref" : "#/components/schemas/GrantBlock", "description" : "Resource object representing grant_block" } }, "required" : [ "grant_block" ], "example" : null }, "example" : null }, "next_offset" : { "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.

", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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_grants" : { "post" : { "summary" : "Create Promotional Grant", "operationId" : "create_promotional_grant", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-device", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request\n", "example" : "Android" } }, { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.\n", "example" : "user@example.com" } }, { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.\n", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-request-origin-ip", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated\n", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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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[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})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-actions", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip all actions to be done on the events\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-email", "in" : "header", "description" : "skip only emails\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-email", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only emails\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-event-webhook", "in" : "header", "description" : "skip only webhooks\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-event-webhook", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "skip only webhooks\n", "enum" : [ "all-disabled" ], "example" : null } }, { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "required" : false, "deprecated" : false, "$ref" : "#/components/parameters/chargebee-business-entity-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n", "maxLength" : 50, "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "maxLength" : 36, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null } }, "required" : [ "amount", "expires_at", "subscription_id", "unit_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "ledger_operations" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/LedgerOperation", "description" : "Resource object representing ledger_operation" }, "example" : null }, "grant_blocks" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/GrantBlock", "description" : "Resource object representing grant_block" }, "example" : null } }, "required" : [ "grant_blocks", "ledger_operations" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } } }, "components" : { "schemas" : { "400" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "invalid_request", "untyped", "payment" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`payment_intent_invalid_amount\\` - Returned when processing amount is different from payment intent amountFor example if payment intent which is passed has authorized 10$ and if the charges initiated is for 12$. \\* \\`configuration_incompatible\\` - Returned when the request is not compatible with the configuration for the site or the configuration is incomplete. \\* \\`payment_intent_invalid\\` - Returned when validation or verification fails for provided payment intent.For example if payment intent which is passed is in not consumable state. \\* \\`invalid_request\\` - Returned when the request has incompatible values or does not match the API specification. As it is a generic error, handling this error is recommended only in combination with param attribute. \\* \\`payment_method_verification_failed\\` - Returned when validation or verification fails for the provided payment method. For example if the payment method is card, this will include all card parameter validation errors and also verification failures from the gateway. \\* \\`payment_processing_failed\\` - Returned when the payment collection fails. \\* \\`resource_limit_exhausted\\` - Returned when any limit constraint is violated by the request. For example this error is thrown when the coupon provided has already expired or its maximum redemption count has been reached. \\* \\`duplicate_entry\\` - Returned when the request provides a duplicate value for an attribute that is specified as unique for that site. For example in 'create subscription api' if you are passing the subscription id then this error will be thrown if a subscription exists in site with the same id. \\* \\`param_wrong_value\\` - Returned when the value does not meet the required specification for the parameter. For example, wrong email format. It is strongly recommended to do the validation at your end before calling Chargebee's API (other than specific cases like VAT number validation). \\* \\`payment_method_not_present\\` - Returned when the request requires payment collection but the 'payment method' details (such as card) is not present for the customer. This error will not occur if auto-collection is disabled for the customer. \\* \\`resource_limit_exceeded\\` \\* \\`payment_gateway_currency_incompatible\\` - Returned when the payment gateway configured is incompatible with the transactional currency. This error will not occur if auto-collection is disabled for the customer.\n", "enum" : [ "payment_intent_invalid_amount", "configuration_incompatible", "payment_intent_invalid", "invalid_request", "payment_method_verification_failed", "payment_processing_failed", "resource_limit_exhausted", "duplicate_entry", "param_wrong_value", "payment_method_not_present", "resource_limit_exceeded", "payment_gateway_currency_incompatible" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "401" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "untyped" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`api_authentication_failed\\` - Returned when authentication failed for the request. The possible reasons could be the api key is invalid or authentication header is not present in the request or the header's format is invalid. \\* \\`basic_authentication_failed\\` - Returned when authentication failed for the request. The possible reasons could be that one or both of the username and password are invalid\n", "enum" : [ "api_authentication_failed", "basic_authentication_failed" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "403" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "untyped", "operation_failed" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`request_blocked\\` - Returned when request is blocked for your site. The blocking could be only for a specific set of operation(s) . The reason would be provided as part of the message. You would have to contact support for additional details. \\* \\`api_authorization_failed\\` - Returned when the API key does not have sufficient privileges to perform the particular operation.\n", "enum" : [ "request_blocked", "api_authorization_failed" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "404" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "invalid_request", "untyped" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`resource_not_found\\` - Returned when any of resource(s) referred in the request is not found. \\* \\`site_not_found\\` - Returned when the site is not found.\n", "enum" : [ "resource_not_found", "site_not_found" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "405" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "invalid_request" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`http_method_not_supported\\` - Returned when the 'http method', specified in the request, is not allowed for this URL. It should not occur if you are using one of the standard client library.\n", "enum" : [ "http_method_not_supported" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "409" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "invalid_request" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`invalid_state_for_request\\` - Returned when the requested operation is not allowed for current state of the resource. This error will occur if the state of the resource has not been checked for the validity of the request. For example this error is returned when we try to schedule subscription changes at 'end of term' for canceled subscriptions.\n", "enum" : [ "invalid_state_for_request" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "422" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "invalid_request" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`unable_to_process_request\\` - Returned when the HTTP request body contains a well-formed, but semantically erroneous payload. For example this error is returned when a client attempts to reuse an idempotency key with a different request payload.\n", "enum" : [ "unable_to_process_request" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "429" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "operation_failed" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`third_party_api_request_limit_exceeded\\` - Returned when your request is blocked temporarily at a third-party service, due to the request count exceeding their acceptable limits. \\* \\`api_request_limit_exceeded\\` - Returned when requests have been blocked temporarily due to request count exceeding acceptable limits. \\* \\`lock_timeout\\` - Returned when there are multiple concurrent requests to the same resource.\n", "enum" : [ "third_party_api_request_limit_exceeded", "api_request_limit_exceeded", "lock_timeout" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "500" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "operation_failed" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`internal_error\\` - Returned when the request parameters were right but the operation couldn't be completed due to a bug in Chargebee side.\n", "enum" : [ "internal_error" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "503" : { "type" : "object", "properties" : { "message" : { "type" : "string", "example" : null }, "param" : { "type" : "string", "example" : null }, "type" : { "type" : "string", "enum" : [ "invalid_request", "operation_failed" ], "example" : null }, "api_error_code" : { "type" : "string", "description" : "\\* \\`db_connection_failure\\` - Returned when db connection fails. \\* \\`site_read_only_mode\\` - Returned when your site is temporarily unavailable for write operations due to a scheduled maintenance. \\* \\`site_not_ready\\` - Returned when your site is temporarily unavailable due to a scheduled maintenance. \\* \\`internal_temporary_error\\` - Returned when temporary occured in Chargebee side. The request can be re-tried, with exponential backoff in case of repeat failures.\n", "enum" : [ "db_connection_failure", "site_read_only_mode", "site_not_ready", "internal_temporary_error" ], "example" : null } }, "required" : [ "api_error_code", "message", "type" ], "example" : null }, "AccountHolderType" : { "type" : "string", "deprecated" : true, "enum" : [ "individual", "company" ], "example" : null }, "AccountReceivablesHandling" : { "type" : "string", "deprecated" : false, "enum" : [ "no_action", "schedule_payment_collection", "write_off" ], "example" : null }, "AccountType" : { "type" : "string", "deprecated" : true, "enum" : [ "checking", "savings", "business_checking", "current" ], "example" : null }, "Action" : { "type" : "string", "deprecated" : false, "enum" : [ "upsert", "remove" ], "example" : null }, "AddUsagesReminderEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "usage_reminder_info" : { "$ref" : "#/components/schemas/UsageReminderInfo" } }, "required" : [ "customer", "subscription", "usage_reminder_info" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "AdditionalBillingLogiq" : { "type" : "object", "properties" : { "allow_price_override" : { "type" : "boolean", "deprecated" : false, "example" : null }, "allow_multiple_coupons" : { "type" : "boolean", "deprecated" : false, "example" : null }, "is_shipping_fields_enabled" : { "type" : "boolean", "deprecated" : false, "example" : null }, "is_reason_codes_enabled" : { "type" : "boolean", "deprecated" : false, "example" : null }, "is_proration_enabled" : { "type" : "boolean", "deprecated" : false, "example" : null }, "void_invoices_with_credit_notes" : { "type" : "boolean", "deprecated" : false, "example" : null }, "hide_zero_value_line_items" : { "type" : "boolean", "deprecated" : false, "example" : null }, "round_off_invoice_amount" : { "type" : "boolean", "deprecated" : false, "example" : null }, "collect_tax_registration" : { "type" : "boolean", "deprecated" : false, "example" : null }, "hide_chargebee_branding" : { "type" : "boolean", "deprecated" : false, "example" : null }, "show_update_address_and_payment_method" : { "type" : "boolean", "deprecated" : false, "example" : null }, "collect_invoice_on_add_or_update_payment_method" : { "type" : "boolean", "deprecated" : false, "example" : null }, "allow_fraud_monitor" : { "type" : "boolean", "deprecated" : false, "example" : null } }, "example" : null }, "Address" : { "type" : "object", "description" : "Subscriptions can have addresses like \"Shipping Address\" associated with them. This is apart from the billing address as part of credit card information.\n", "properties" : { "label" : { "type" : "string", "deprecated" : false, "description" : "Label to identify the address. This is unique for all the address for a subscription.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number\n", "maxLength" : 50, "example" : null }, "addr" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "extended_addr" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "extended_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "Name of the city\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* invalid -\n\nAddress is invalid.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null } }, "required" : [ "label", "subscription_id" ], "example" : null }, "AdvanceInvoiceSchedule" : { "type" : "object", "description" : "

The invoice for a subscription in Chargebee is generated at the time of subscription renewal. Invoices can also be generated in advance for an upcoming renewal or set of renewals. With Advance Invoicing Schedules, you can set up a plan for when such advance invoices are generated for the lifetime of the subscription. This helps you:

Advance invoices can be scheduled in two ways:

Specific Dates Schedule

Advance invoices for a subscription can be scheduled to be generated on specific dates in the future. You must specify the number of billing cycles to be invoiced on each date. A maximum of 5 dates can be specified.

Fixed Interval Schedule

Advance invoices can be scheduled to be generated at fixed intervals of time, where each interval spans the same number of billing cycles of the subscription. The invoice for each interval is generated a specified number of days (days_before_interval) before the start of the interval. You can configure the schedule to end on a certain date or after a specified number of advance invoices have been generated.

The start date of the first interval depends on the number of days remaining from current time till the next renewal of the subscription. If this is more than days_before_interval, the interval begins at the next renewal. On the other hand, if the number of days remaining before the next renewal is less than days_before_interval, the first interval begins at the renewal following the next.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

System-generated and immutable unique Id for the advance_invoice_schedule\n.

", "maxLength" : 40, "example" : null }, "schedule_type" : { "type" : "string", "deprecated" : false, "description" : "The type of advance invoice or advance invoicing schedule.\n\\* specific_dates -\n\nThe advance charges occur on specific dates. For each date, [a fixed number of billing cycles](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule_terms_to_charge)\nis charged for. There can be up to 5 dates configured.\n\\* fixed_intervals -\n\nThe advance charges occur at [fixed intervals of time](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_terms_to_charge)\n.\n", "enum" : [ "fixed_intervals", "specific_dates" ], "example" : null }, "fixed_interval_schedule" : { "type" : "object", "deprecated" : false, "description" : "

When the schedule_type\nis fixed_intervals\n, this object gives further details of the schedule.

", "properties" : { "end_schedule_on" : { "type" : "string", "deprecated" : false, "description" : "

Specifies when the schedule should end.

\n* after_number_of_intervals -

Advance invoices are generated a specified number of times

\n* subscription_end -

Advance invoices are generated for as long as the subscription is active.

\n* specific_date -

End the advance invoicing schedule on a specific date\n.

", "enum" : [ "after_number_of_intervals", "specific_date", "subscription_end" ], "example" : null }, "number_of_occurrences" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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\nof the subscription. This parameter is applicable only when fixed_interval_schedule[end_schedule_on]\n= after_number_of_intervals

", "minimum" : 1, "example" : null }, "days_before_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before each interval that advance invoices are generated.\n", "minimum" : 1, "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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]\n= specific_date\n.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when this advance invoicing schedule was created.\n", "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles in one interval.\n", "minimum" : 1, "example" : null } }, "required" : [ "created_at" ], "example" : null }, "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "The advance charges occur on specific dates. For each date, \\[a fixed number of billing cycles\\](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured.\n", "properties" : { "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of billing cycles to charge for, on the date specified. Applicable only when schedule_type\nis specific_dates.

", "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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\nis specific_dates\n.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when this advance invoicing schedule was created.\n", "example" : null } }, "required" : [ "created_at" ], "example" : null } }, "required" : [ "id" ], "example" : null }, "AlarmStatus" : { "type" : "string", "deprecated" : false, "enum" : [ "within_limit", "in_alarm" ], "example" : null }, "Alert" : { "type" : "object", "description" : "

An alert defines a threshold rule for usage, spend, or credit balance. When the configured threshold is crossed, Chargebee triggers a webhook notification so that you can take action such as notifying the customer, upgrading the plan, or pausing further consumption.

Common examples of alerts include:

The alert resource represents configuration only. To check the current runtime state of an alert for a subscription (whether it is within_limit or in_alarm), use the Alert Status endpoints.

Global vs. subscription-scoped alerts

Alerts can be created at two levels:

    \n
  • Global alerts apply across all relevant subscriptions. To restrict a global alert to specific plans, use filter_conditions with the plan_price_id field. When multiple filter conditions are provided, they are evaluated with OR semantics: the alert applies if any condition matches.
  • \n
  • Subscription-scoped alerts apply to a single subscription only. Set subscription_id when creating the alert. Subscription-scoped alerts cannot have filter_conditions.
  • \n

Important

A global alert and a subscription-scoped alert are mutually exclusive in their parameters: if subscription_id is set, filter_conditions must not be provided, and vice versa.

Alert types

The type attribute determines what an alert measures, which input it requires, and how the threshold is interpreted.

usage_exceeded

Monitors consumption of a metered feature for a subscription.

    \n
  • Required input: metered_feature_id.
  • \n
  • Fires when: measured usage reaches or exceeds the configured threshold.
  • \n
  • Threshold modes: percentage (of the plan or feature quota) or absolute (a usage quantity).
  • \n
  • Example: notify a customer when they reach 90% of their monthly API-call quota.
  • \n

Usage alerts are evaluated as usage data is processed for the subscription.

spend_exceeded

Monitors the total usage-based spend accumulated from metered addons on a subscription. This is the same overage concept surfaced by usage charges: the monetary overage spend corresponds to the amount field on the usage charge object (in major units of the currency).

    \n
  • Required input: currency_code — the ISO currency code in which overage spend is tracked.
  • \n
  • Fires when: accumulated overage spend reaches or exceeds the configured threshold.
  • \n
  • Threshold mode: always absolute (an amount in currency_code).
  • \n
  • Example: alert the customer when their spending exceeds a 500 USD limit during the current usage cycle.
  • \n

Spend alerts are evaluated as usage and overage charge data is processed for the subscription.

credit_balance_dropped

Monitors the prepaid credit balance of a subscription for a specific credit unit. See ledger account balances for how credit balances are tracked.

    \n
  • Required input: unit_id — the credit unit the alert applies to (for example, ai_credits).
  • \n
  • Fires when: the credit balance drops to or below the configured threshold. This is the opposite direction to the usage_exceeded and spend_exceeded types, which fire when a value rises.
  • \n
  • Threshold mode: always absolute (a credit-balance floor). percentage mode is not supported.
  • \n
  • Example: warn a customer when their remaining AI credits drop to or below 10.
  • \n

Credit-balance alerts are evaluated as ledger operations update the balance.

Threshold modes

The threshold object defines when the alert should fire. It has two fields:

    \n
  • mode: Either percentage or absolute.\n
      \n
    • percentage: The alert fires when the measured value reaches the specified percentage threshold. The value must be between 0 and 100 (inclusive). Supported only for usage_exceeded alerts.
    • \n
    • absolute: The alert fires when the measured value reaches an absolute quantity. The value must be >= 0.
    • \n
    \n
  • \n
  • value: The numeric threshold at which the alert triggers.
  • \n

The supported modes depend on the alert type:

    \n
  • usage_exceeded: percentage or absolute.
  • \n
  • spend_exceeded: absolute only.
  • \n
  • credit_balance_dropped: absolute only.
  • \n

See also

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the alert configuration.\n", "maxLength" : 40, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of alert. Determines what the alert measures, which input it requires, and how the threshold is interpreted.

\n* usage_exceeded -

The alert fires when usage of the metered feature (identified by metered_feature_id) reaches or exceeds the configured threshold. Supports both percentage and absolute threshold modes.

\n* spend_exceeded -

The alert fires when the total usage-based spend accumulated from metered addons reaches or exceeds the configured threshold. Only spend from usage beyond the included entitlement is counted. See usage charges for how overage spend is computed. The threshold mode is always absolute.

\n* credit_balance_dropped -

The alert fires when the credit balance for the configured credit unit drops to or below the configured threshold. The threshold mode is always absolute.

", "enum" : [ "usage_exceeded", "spend_exceeded", "credit_balance_dropped" ], "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A human-readable name for the alert, shown in the Chargebee UI and webhook payloads. Maximum 50 characters.\n", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "An optional description providing additional context about the alert. Maximum 65,000 characters.\n", "maxLength" : 65000, "example" : null }, "metered_feature_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the metered feature that this alert monitors. Present only for usage_exceeded alerts.

", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO currency code in which the metered-addon overage spend is measured. Present only for spend_exceeded alerts.

", "maxLength" : 3, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit that this alert monitors. Present only for credit_balance_dropped alerts.

", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the subscription this alert is scoped to. Present only for subscription-scoped alerts; null for global alerts.

", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "enabled", "deprecated" : false, "description" : "

Whether the alert is currently active. A disabled alert is not evaluated.

\n* enabled -

The alert is active and will trigger when the threshold is breached.

\n* disabled -

The alert is inactive and will not trigger.

", "enum" : [ "enabled", "disabled" ], "example" : null }, "meta" : { "type" : "string", "deprecated" : false, "description" : "An optional string field for storing custom metadata with the alert (for example, JSON serialized by your integration). Maximum 65,000 characters.\n", "maxLength" : 65000, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp (UTC, in seconds) indicating when the alert was created.\n", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp (UTC, in seconds) indicating when the alert was last updated.\n", "example" : null }, "threshold" : { "type" : "object", "deprecated" : false, "description" : "The threshold configuration that defines when this alert fires.\n", "properties" : { "mode" : { "type" : "string", "deprecated" : false, "description" : "

How the threshold value is interpreted. usage_exceeded alerts support percentage or absolute. spend_exceeded and credit_balance_dropped alerts always use absolute.

\n* percentage -

The threshold value represents a percentage (0-100) of the plan or feature quota. Supported only for usage_exceeded alerts.

\n* absolute -

The threshold value represents an absolute quantity: a usage quantity for usage_exceeded, an overage spend amount for spend_exceeded, or a credit-balance floor for credit_balance_dropped. For spend_exceeded, the amount is expressed in the major units of currency_code (for example, dollars—not cents—for USD, so 500.0 means 500 USD).

", "enum" : [ "absolute", "percentage" ], "example" : null }, "value" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "

The numeric threshold at which the alert fires. For percentage mode, this must be between 0 and 100 inclusive. For absolute mode, this must be >= 0.

", "example" : null } }, "required" : [ "mode", "value" ], "example" : null }, "filter_conditions" : { "type" : "array", "deprecated" : false, "description" : "

An array of conditions that restrict which subscriptions a global alert applies to. Multiple conditions are evaluated with OR logic. Cannot be set when subscription_id is provided.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "field" : { "type" : "string", "deprecated" : false, "description" : "

The subscription attribute to filter on. Currently only plan_price_id is supported.

\n* plan_price_id -

Filters by the plan price associated with the subscription.

", "enum" : [ "plan_price_id" ], "example" : null }, "operator" : { "type" : "string", "deprecated" : false, "description" : "

The comparison operator for the filter condition.

\n* not_equals -

The subscription attribute must not equal the specified value.

\n* equals -

The subscription attribute must equal the specified value.

", "enum" : [ "equals", "not_equals" ], "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "The value to compare against, for example, a specific plan price identifier. Maximum 50 characters.\n", "maxLength" : 50, "example" : null } }, "required" : [ "field", "operator", "value" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "id", "name", "type", "updated_at" ], "example" : null }, "AlertStatus" : { "type" : "object", "description" : "

An alert status represents the runtime evaluation of an alert for a specific subscription. While the alert resource defines the threshold rule, the alert status tells you whether a subscription is currently within_limit or in_alarm for that rule. Statuses are tracked for every alert type — usage_exceeded, spend_exceeded, and credit_balance_dropped.

Each alert status tracks:

Note: Alert statuses are computed by Chargebee based on billing data and the alert configuration. They are read-only — you cannot create or update an alert status directly. To change the threshold rule, use the Alerts API.

", "properties" : { "alert_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the [alert](/docs/api/alerts) configuration that this status corresponds to.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the [subscription](/docs/api/subscriptions) that this status is evaluated for.\n", "maxLength" : 50, "example" : null }, "alarm_status" : { "type" : "string", "deprecated" : false, "description" : "

The current runtime state of the alert for this subscription. Indicates whether the subscription is within the configured threshold or has breached it.

\n* within_limit -

The subscription is within the configured threshold.

\n* in_alarm -

The configured threshold has been breached and the alert has been triggered for this subscription. Depending on the alert type, this means the measured value has reached or exceeded the threshold (usage_exceeded, spend_exceeded) or the credit balance has dropped to or below it (credit_balance_dropped).

", "enum" : [ "within_limit", "in_alarm" ], "example" : null }, "alarm_triggered_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Timestamp (UTC, in seconds) indicating when the alert last entered the in_alarm state for this subscription. null if the alert has never been triggered.

", "example" : null } }, "required" : [ "alarm_status", "alert_id", "subscription_id" ], "example" : null }, "AlertStatusChangedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "alert" : { "$ref" : "#/components/schemas/Alert" }, "alert_status" : { "$ref" : "#/components/schemas/AlertStatus" } }, "required" : [ "alert", "alert_status" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Amendment" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "event_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "enum" : [ "subscription_changed", "subscription_created", "subscription_cancelled", "subscription_reactivated_with_backdating", "subscription_activated_with_backdating", "subscription_created_with_backdating", "subscription_resumption_scheduled", "subscription_scheduled_resumption_removed", "subscription_canceled_with_backdating", "subscription_changed_with_backdating", "subscription_changes_scheduled", "subscription_cancellation_scheduled", "subscription_pause_scheduled", "subscription_scheduled_changes_removed", "subscription_scheduled_cancellation_removed", "subscription_scheduled_pause_removed", "subscription_reactivated" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "executed", "scheduled", "canceled" ], "example" : null }, "sequence_number" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "effective_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "source" : { "type" : "string", "deprecated" : false, "enum" : [ "admin_console", "api", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "bulk_operation", "external_service" ], "example" : null }, "user" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "api_key_name" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "amendment_contents" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 30, "example" : null }, "subscription_amendment_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "action" : { "type" : "string", "deprecated" : false, "enum" : [ "added", "removed", "modified" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "customer", "subscription", "invoice", "quote", "credit_note", "transaction", "plan", "addon", "coupon", "order", "item_family", "item", "item_price", "plan_item", "addon_item", "charge_item", "plan_price", "addon_price", "charge_price", "differential_price", "attached_item", "feature", "subscription_entitlement", "item_entitlement", "business_entity", "price_variant", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_transaction", "recorded_purchase", "omnichannel_subscription_item_scheduled_change", "sales_order", "omnichannel_one_time_order", "omnichannel_one_time_order_item", "usage_file", "business_rule", "ruleset", "alert_status", "omnichannel_subscription_item_metric" ], "example" : null }, "field" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "old_value" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "new_value" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "action", "created_at", "entity_type", "field", "id", "subscription_amendment_id" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "effective_at", "event_id", "id", "sequence_number", "source", "status", "subscription_id", "type" ], "example" : null }, "ApiKey" : { "type" : "object", "properties" : { "key_name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "key" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "enabled", "disabled" ], "example" : null }, "roles" : { "type" : "array", "deprecated" : false, "items" : { "type" : "string", "deprecated" : false, "enum" : [ "full_access", "update_access", "read_only_access", "read_transactional_data", "read_product_configuration", "publishable", "publishable_extended" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "key_name" ], "example" : null }, "ApiVersion" : { "type" : "string", "default" : "v1", "deprecated" : false, "enum" : [ "v1", "v2" ], "example" : null }, "AppliedRule" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "version" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "evaluation_result" : { "type" : "boolean", "deprecated" : false, "example" : null }, "error_message" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "actions" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null } }, "required" : [ "id" ], "example" : null }, "ApplyOn" : { "type" : "string", "deprecated" : false, "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "ApplyRule" : { "type" : "object", "properties" : { "evaluate" : { "type" : "boolean", "deprecated" : false, "example" : null }, "rule_id" : { "type" : "string", "deprecated" : false, "example" : null }, "ruleset_id" : { "type" : "string", "deprecated" : false, "example" : null }, "skip_failed_rules" : { "type" : "boolean", "deprecated" : false, "example" : null }, "structured_expression" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "context" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "rules" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "version" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "evaluation_result" : { "type" : "boolean", "deprecated" : false, "example" : null }, "error_message" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "actions" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null } }, "required" : [ "id" ], "example" : null }, "example" : null } }, "example" : null }, "ApprovalConditionInfo" : { "type" : "object", "properties" : { "operand" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "operator" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null } }, "required" : [ "operand", "operator" ], "example" : null }, "ApprovalEstimate" : { "type" : "object", "properties" : { "approval_required" : { "type" : "boolean", "deprecated" : false, "example" : null } }, "required" : [ "approval_required" ], "example" : null }, "ApprovalPreviewInfo" : { "type" : "object", "properties" : { "rule_name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "version" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "rule_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "stages" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "approver_policy" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "users" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "email", "name" ], "example" : null }, "example" : null } }, "required" : [ "approver_policy", "name" ], "example" : null }, "example" : null }, "conditions" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "operand" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "operator" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null } }, "required" : [ "operand", "operator" ], "example" : null }, "example" : null } }, "required" : [ "rule_id", "rule_name", "version" ], "example" : null }, "ApprovalStageInfo" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "approver_policy" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "users" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "email", "name" ], "example" : null }, "example" : null } }, "required" : [ "approver_policy", "name" ], "example" : null }, "ApprovalUserInfo" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "email", "name" ], "example" : null }, "AsyncJob" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "in_progress", "completed", "failed" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "completed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "request" : { "type" : "object", "deprecated" : false, "properties" : { "resource" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "action_type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "action_type", "resource" ], "example" : null }, "result" : { "type" : "object", "deprecated" : false, "properties" : { "content" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "content_list" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "error" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null } }, "example" : null } }, "required" : [ "created_at", "id", "request", "status" ], "example" : null }, "AsyncRequest" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "resource" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "operation_type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "enqueued", "in_process", "success", "failed" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "started_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "completed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "result" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "error_detail" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null } }, "required" : [ "created_at", "error_detail", "id", "operation_type", "resource", "result", "status", "updated_at" ], "example" : null }, "AsyncResponse" : { "type" : "object", "description" : "

Note: The asynchronous API is only enabled for selected customers. To enable it for your site, contact Chargebee Support.

The Chargebee asynchronous API allows selected API operations to be executed in the background. Instead of waiting for the operation to complete within the same HTTP request, the API immediately acknowledges the request and processes it asynchronously.

Your application sends the same API request it would use for a synchronous call, but with special headers. Chargebee responds immediately with HTTP 202 Accepted and an empty response body, meaning the work has been accepted and will run in the background.

When processing finishes (success or failure), Chargebee delivers the outcome to the callback URL provided in the request header. The callback payload contains the async_response object described below.

Both synchronous and asynchronous requests use the same API endpoints and request payloads. The distinction is defined solely by the request headers.

Required headers

HeaderPurpose
Prefer: respond-asyncRequired. Tells Chargebee to process the request asynchronously and return 202 Accepted.
chargebee-request-idRequired. Your unique id for this async api (see chargebee-request-id).
chargebee-async-callback-urlRequired. The callback URL where Chargebee will POST the result. Must be in the format: https://username:password@example.com (see async-api-callback).

Async API callback

You must provide a callback URL in the chargebee-async-callback-url header for every async API request. Chargebee delivers the outcome (success or failure) to this URL when asynchronous processing completes. Ensure the provided URL is a stable HTTPS endpoint.

The response is a list envelope:

{\n  "list": [\n    {\n      "async_response": {\n        "api_version": "v2",\n        "created_at": 1780464441,\n        "completed_at": 1780464442,\n        "status": "success",\n        "request": {\n          "id": "7c9e2f4a-8b1d-4e6f-9a0c-merchant-generated-uuid",\n          "resource": "invoice",\n          "operation_type": "void_invoice",\n          "method": "POST",\n          "uri": "/api/v2/invoices/inv_123/void"\n        },\n        "result": {\n          "invoice": {\n            "id": "inv_123",\n            "status": "voided",\n            "object": "invoice"\n          }\n        }\n      }\n    }\n  ]\n}\n

When status is failed, result is omitted and error_detail is included instead.

Chargebee Request Id

This header is the primary key for your async job.

TopicDetail
PurposeUniquely identifies one async submission so you can match the eventual callback to the originating call.
RequiredOmitting it or sending a blank value results in an invalid request error.
Max length100 characters.
UniquenessMust be unique. Reuse is allowed after two days.
Recommended formatA UUID (36 characters) or another opaque string within the length limit. Avoid personally identifiable information.
Correlation in callbackThe callback includes the same value as request.id inside the async_response object.

Example request

curl https://{site}.chargebee.com/api/v2/invoices/inv_123/void \\\n  -u {api_key}: \\\n  -X POST \\\n  -H "Prefer: respond-async" \\\n  -H "chargebee-request-id: 7c9e2f4a-8b1d-4e6f-9a0c-merchant-generated-uuid" \\\n  -H "chargebee-async-callback-url: https://username:password@example.com" \\\n  -d comment="Shipped in error"\n

Immediate HTTP response

Integration checklist

", "properties" : { "api_version" : { "type" : "string", "deprecated" : false, "description" : "

The Chargebee API version used for the original request. For example, v2.

", "maxLength" : 10, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which the async request was accepted and queued by Chargebee.\n", "example" : null }, "completed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which the async operation finished processing (success or failure).\n", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Current completion status of the async operation.

\n* failed -

The operation failed after being accepted for async processing. The error_detail object contains failure information.

\n* success -

The operation completed successfully. The result object contains the API response.

", "enum" : [ "success", "failed" ], "example" : null }, "result" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

Returned only when status is success. Contains the same response structure that the synchronous version of the API operation would have returned. For example, if the original request created a credit note, result contains a credit_note object.

", "example" : null }, "request" : { "type" : "object", "deprecated" : false, "description" : "Object containing metadata about the original API request that was submitted asynchronously.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier you provided in the chargebee-request-id header of the original async request.

", "maxLength" : 100, "example" : null }, "resource" : { "type" : "string", "deprecated" : false, "description" : "

The API resource targeted by the original request. For example, credit_note or invoice.

", "maxLength" : 100, "example" : null }, "operation_type" : { "type" : "string", "deprecated" : false, "description" : "

The operation type of the original request. For example, create_credit_note or void_invoice.

", "maxLength" : 100, "example" : null }, "method" : { "type" : "string", "deprecated" : false, "description" : "

The HTTP method of the original request. For example, POST.

", "maxLength" : 10, "example" : null }, "uri" : { "type" : "string", "deprecated" : false, "description" : "

The request URI of the original API call. For example, /api/v2/credit_notes.

", "maxLength" : 512, "example" : null }, "idempotency_key" : { "type" : "string", "deprecated" : false, "description" : "

The chargebee-idempotency-key sent in the original request, if any. This value is echoed back as metadata only; async submissions are deduplicated using the unique chargebee-request-id, not the idempotency key.

", "maxLength" : 250, "example" : null } }, "required" : [ "id" ], "example" : null }, "error_detail" : { "type" : "object", "deprecated" : false, "description" : "

Returned when status is failed. Contains information about why the operation failed.

", "properties" : { "message" : { "type" : "string", "deprecated" : false, "description" : "A human-readable description of the error.\n", "maxLength" : 500, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The category of the error. For example, invalid_request.

", "maxLength" : 100, "example" : null }, "api_error_code" : { "type" : "string", "deprecated" : false, "description" : "

A Chargebee-defined error code identifying the specific error. For example, resource_not_found.

", "maxLength" : 100, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "An additional error code associated with the failure, when available.\n", "maxLength" : 100, "example" : null }, "error_msg" : { "type" : "string", "deprecated" : false, "description" : "An additional error message associated with the failure, when available.\n", "maxLength" : 250, "example" : null }, "http_status_code" : { "type" : "string", "deprecated" : false, "description" : "The HTTP status code that the synchronous version of the API operation would have returned for this failure.\n", "maxLength" : 100, "example" : null } }, "example" : null } }, "required" : [ "status" ], "example" : null }, "AsyncResponseList" : { "type" : "object", "properties" : { "list" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "api_version" : { "type" : "string", "deprecated" : false, "maxLength" : 10, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "completed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "success", "failed" ], "example" : null }, "request" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "resource" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "operation_type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "method" : { "type" : "string", "deprecated" : false, "maxLength" : 10, "example" : null }, "uri" : { "type" : "string", "deprecated" : false, "maxLength" : 512, "example" : null }, "idempotency_key" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null } }, "required" : [ "id" ], "example" : null }, "error_detail" : { "type" : "object", "deprecated" : false, "properties" : { "message" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "api_error_code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "error_msg" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "http_status_code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "example" : null }, "result" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null } }, "required" : [ "status" ], "example" : null }, "example" : null } }, "example" : null }, "AttachedItem" : { "type" : "object", "description" : "

Addon-item and charge-item prices are purchased with plan-item prices in subscriptions. You can automate this process by configuring certain addons and charges as "attached" to certain plans. This is done at the "item" level. In other words, addon- and charge-items can be attached to plan-items.

Once the attachment is defined, while creating or updating a subscription, the addon- or charge-item prices are selected automatically based on the plan-item price selected . Let's look at the details:

Addons

Addons can be attached to plans as recommended, mandatory or optional.

How auto-selection of the addon-item price works

Once an addon has been attached as mandatory, the addon-item price to be applied to the plan-item price is selected based on the following rule: The addon-item price with the same currency as that of the plan-item price and the longest compatible period is selected.

Here's an example:

Consider a plan Standard Cloud Storage has an addon Extra Storage attached to it. Note that each of the two are items. Now consider that they have item prices with the following periods and currencies:

Item price for "Standard Cloud Storage" plan-item:

Item prices for "Extra Storage" addon-item:

For the plan-item price (Standard Cloud Storage, 3 years, AUD), the addon-item prices with matching currencies are the last 4 from the above list:

From among them, the last two have periods that are incompatible with the plan-item price period of 3 years. From the remaining 2 addon-item prices, the one with the longest period is of 18 months. So, "Extra Storage, 18 months, AUD" is selected for mandatory application to the plan item price.

Charges

Charges can also be attached to plans. When doing so, you specify the event at which the charge is to be applied to the subscription. For some events that can occur multiple times in a subscription lifetime, you can also set whether to apply the charge each time the event occurs or just once.

There may be multiple item prices for a given attached charge. The item price that matches the currency of the plan-item price is automatically selected for application.

Here's an example:

Consider a plan Standard Cloud Storage has a charge named Implementation Fee attached to it. Now consider their item prices below, with the following periods and currencies:

Item price for "Standard Cloud Storage" plan-item:

Item prices for "Implementation Fee" charge-item:

From among the charge-item prices above, the one compatible with the plan-item price is "Implementation Fee, AUD" since it has the same currency as the plan-item price.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique id for the attached item. Set to a random, immutable value automatically when the attached item is created.\n", "maxLength" : 100, "example" : null }, "parent_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the plan-item to which the item is attached.

", "maxLength" : 100, "example" : null }, "item_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item being attached.\n", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of attachment for the addon. Only applicable for addon-items.

\n* recommended -

The addon is recommended to go with the plan-item when using Checkout\nor Portal\n.

\n* optional -

The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a quantity\nand billing_cycles\nfor the addon, for when it is applied to subscriptions with the plan.

\n* mandatory -

The addon is attached automatically to the subscription for the plan-item unless explicitly removed\nvia API.

", "enum" : [ "recommended", "mandatory", "optional" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The item state.\n\\* active -\n\nNew subscriptions can be created with the item.\n\\* deleted -\n\nNo subscriptions allowed for the item.\n\\* archived -\n\nNo new subscriptions allowed for the item.\n", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The default quantity of the addon to be attached when the quantity is not specified while [creating](/docs/api/subscriptions/create-subscription-for-items)\n/[updating](/docs/api/subscriptions/update-subscription-for-items)\nthe subscription.\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires addon billing cycles\nto be enabled for the site.

\n

The value set explicitly for billing_cycles\nwhile applying the addon to a subscription\ntakes precedence over this attribute. This attribute, in turn, has a higher precedence than the value set for the addon-item price\n.

", "minimum" : 1, "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the item is charged. This attribute only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_creation -

the time of creation of the subscription.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* on_demand -

Item can be charged on demand

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This attribute only applies to charge-items.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which this attached item was created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which this attached item was last updated.\n", "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the\n[business entity](/docs/api/getting-started)\nof this subscription. This is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.\n", "maxLength" : 50, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the attached item has been deleted or not.\n", "example" : null } }, "required" : [ "created_at", "deleted", "id", "item_id", "parent_item_id", "type" ], "example" : null }, "AttachedItemCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "attached_item" : { "$ref" : "#/components/schemas/AttachedItem" } }, "required" : [ "attached_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "AttachedItemDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "attached_item" : { "$ref" : "#/components/schemas/AttachedItem" } }, "required" : [ "attached_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "AttachedItemUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "attached_item" : { "$ref" : "#/components/schemas/AttachedItem" } }, "required" : [ "attached_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Attribute" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "name", "value" ], "example" : null }, "AuthorizationSucceededEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" } }, "required" : [ "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "AuthorizationVoidedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" } }, "required" : [ "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "AutoCollection" : { "type" : "string", "deprecated" : false, "enum" : [ "on", "off" ], "example" : null }, "AvalaraSaleType" : { "type" : "string", "deprecated" : false, "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "BillingAlignmentMode" : { "type" : "string", "deprecated" : false, "enum" : [ "immediate", "delayed" ], "example" : null }, "BillingConfiguration" : { "type" : "object", "properties" : { "is_calendar_billing_enabled" : { "type" : "boolean", "deprecated" : false, "example" : null }, "billing_dates" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "example" : null }, "example" : null } }, "required" : [ "is_calendar_billing_enabled" ], "example" : null }, "BillingDateMode" : { "type" : "string", "deprecated" : false, "enum" : [ "using_defaults", "manually_set" ], "example" : null }, "BillingDayOfWeekMode" : { "type" : "string", "deprecated" : false, "enum" : [ "using_defaults", "manually_set" ], "example" : null }, "BillingMetricBreakdown" : { "type" : "object", "properties" : { "line_item_code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "line_item_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan", "addon", "charge", "discount", "tax" ], "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "total_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "billing_doc_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "billing_doc_type" : { "type" : "string", "deprecated" : false, "enum" : [ "invoice", "credit_note" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "lineage_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "version" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "occurred_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "allocated_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null } }, "required" : [ "billing_doc_type", "created_at", "date_from", "date_to", "line_item_code", "line_item_id", "line_item_type", "total_amount", "updated_at" ], "example" : null }, "BillingMetricLine" : { "type" : "object", "properties" : { "lineage_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "contract_term_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "quantity_per_billing_cycle" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "unit_price_per_billing_cycle" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "billing_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "billing_period_unit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "week", "month", "year", "not_applicable" ], "example" : null }, "effective_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "effective_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "total_contract_value_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "total_tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "version" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "occurred_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "contract_created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "currency" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "allocated_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "enum" : [ "discount", "coupon" ], "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "allocated_amount" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "customer_id", "effective_from", "effective_to", "item_price_id", "lineage_id", "quantity_per_billing_cycle", "total_contract_value_before_tax", "total_tax_amount", "unit_price_per_billing_cycle", "updated_at" ], "example" : null }, "BillingPeriodUnit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "week", "month", "year" ], "example" : null }, "BillingStartOption" : { "type" : "string", "default" : "on_specific_date", "deprecated" : false, "enum" : [ "immediately", "on_specific_date" ], "example" : null }, "Brand" : { "type" : "object", "description" : "The brand to which this offer belongs, including its unique id and human-readable name\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the brand to which these offers belong.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the brand to which these offers belong.\n", "maxLength" : 150, "example" : null } }, "required" : [ "id", "name" ], "example" : null }, "BrandConfiguration" : { "type" : "object", "properties" : { "logo_url" : { "type" : "string", "deprecated" : false, "maxLength" : 300, "example" : null }, "scaled_logo_url" : { "type" : "string", "deprecated" : false, "maxLength" : 300, "example" : null }, "scaled_logo_width" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "logo_size" : { "type" : "string", "deprecated" : false, "enum" : [ "small", "medium", "large" ], "example" : null }, "icon_url" : { "type" : "string", "deprecated" : false, "maxLength" : 300, "example" : null }, "scaled_icon_url" : { "type" : "string", "deprecated" : false, "maxLength" : 300, "example" : null }, "scaled_icon_width" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "icon_size" : { "type" : "string", "deprecated" : false, "enum" : [ "small", "medium", "large" ], "example" : null }, "favicon_url" : { "type" : "string", "deprecated" : false, "maxLength" : 300, "example" : null }, "scaled_favicon_url" : { "type" : "string", "deprecated" : false, "maxLength" : 300, "example" : null }, "color" : { "type" : "string", "default" : "#2196F3", "deprecated" : false, "maxLength" : 7, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "modified_at" ], "example" : null }, "BrandStyle" : { "type" : "object", "properties" : { "handle" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 255, "example" : null }, "custom_domain" : { "type" : "string", "deprecated" : false, "maxLength" : 255, "example" : null }, "website_url" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "created_by" : { "type" : "string", "deprecated" : false, "maxLength" : 255, "example" : null }, "primary_color" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "assets" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "configuration" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null } }, "required" : [ "handle", "name" ], "example" : null }, "BusinessEntity" : { "type" : "object", "description" : "

The business_entity resource represents a business unit or brand under your organization. Key resources in Chargebee Billing (such as customer, subscriptions, invoices, and transactions) along with the associated site configurations, fall under a business entity. Each Chargebee Billing site has one business entity by default. You may create multiple business entities in the following scenarios:

Creating multiple business entities lets you separate configuration and data for your business units or brands so that you can manage their billing and revenue operations independently.

See also

More information on business entities and the configuration options available.

Specifying business entity in API operations

All API operations in Chargebee have site context. Context restrictions cannot be assigned to API keys. However, if your site has multiple business entities, you can specify the business entity context for an API call by passing a custom HTTP request header.

API behavior based on business entity specified

The table below explains how Chargebee responds to various API calls depending on whether the business entity ID is specified as part of the API call.

Note

Some of the words used here are defined in the Terminology section.

Operation/Type of operationBehaviorExamples
Any operation that creates a customer resource
    \n
  • If business_entity_id is provided, the customer resource is created and linked to it.
  • \n
  • If business_entity_id is not provided, the customer resource is created under the default business entity of the site.
  • \n
Create a resource other than customer
    \n
  • If business_entity_id is provided, and it is the same as that linked to the target resource: the resource is created and linked to the business entity provided.
  • \n
  • If business_entity_id is provided, and it is not the same as that linked to the target resource, a 404 Not Found response is sent because the resource cannot be found in the context of the business entity specified.
  • \n
  • If business_entity_id is not provided, the resource is created and linked to the business entity of the target resource.
  • \n
Update/delete a resource
    \n
  • If business_entity_id is provided, and it is the same as that linked to the resource, the operation proceeds successfully.
  • \n
  • If business_entity_id is provided, and it is not the same as that linked to the resource, a 404 Not Found response is sent because the resource cannot be found in the context of the business entity specified.
  • \n
  • If business_entity_id is not provided, the operation proceeds successfully.
  • \n
List resources
    \n
  • If business_entity_id is provided, then only those resources linked to the business entity are returned since the context of the operation is now restricted to the business entity specified.
  • \n
  • If business_entity_id is not provided, then all resources in the site are returned.
  • \n
Retreive a resource
    \n
  • If business_entity_id is provided, and it is the same as that linked to the resource, the resource is retrieved successfully.
  • \n
  • If business_entity_id is provided, and it is not the same as that linked to the resource, a 404 Not Found response is sent because the resource cannot be found in the context of the business entity specified.
  • \n
  • If business_entity_id is not provided, the resource is retrieved successfully.
  • \n
Terminology

This section defines some useful terms for describing how business entities work.

Linked business entity

Any resource is always associated with precisely one and only one business entity. We call it the linked business entity of the resource, or simply, the business entity of the resource.

Default business entity

When customer resource is created and no business entity is specified, it is linked to the business entity designated as the default business entity of the site. A site always has a default business entity. Please choose the first business entity details carefully, as it can't be changed later, and this will be your default entity when no business entity is specified.

Context of an operation

Any site has data in it. This includes all the various resources such as customers, subscriptions, invoices, comments, and so on. The "context" of an API operation is the subset of site data it has access to. An API operation can only read or write data within its context. By default, an API operation has "site context", which means it has access to the entire site's data. However, when a business entity is specified in an API operation, it has "business entity context", which means that the operation only has access to the data linked to the business entity.

Example

Consider the List customers API. When you call the API without specifying a business entity, its context is that of the site and therefore returns customer resources for the entire site. However, when you specify a business entity, the context is only that of the business entity, and therefore the customer resources of only the selected business entity are returned.

Let's look at the Create checkout for a new subscription API. Say you're calling this API and providing the customer[id] parameter. When no business entity is specified, the operation has site context and therefore looks up the ID among all the customer resources in the site. However, when a business entity is provided, the operation has business entity context and looks up the ID only among the customers linked to that business entity.

Target resource

While creating an API resource other than a customer, you specify a target resource under which it should be created. For example:

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the business entity. It is always autogenerated.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A human-friendly name for the business entity.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of the business entity.\n\\* active -\n\nThe business entity is active and can be used.\n\\* inactive -\n\nThe business entity is inactive and cannot be used.\n", "enum" : [ "active", "inactive" ], "example" : null }, "deleted" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates that the business entity has been deleted.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when this business entity was created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time period when the business entity was updated.\n", "example" : null } }, "required" : [ "created_at", "deleted", "id", "name", "status" ], "example" : null }, "BusinessEntityCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "business_entity" : { "$ref" : "#/components/schemas/BusinessEntity" } }, "required" : [ "business_entity" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "BusinessEntityDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "business_entity" : { "$ref" : "#/components/schemas/BusinessEntity" } }, "required" : [ "business_entity" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "BusinessEntityTransfer" : { "type" : "object", "description" : "

business_entity_transfer\nencapsulates the details of the movement of a resource (such as customer\nand subscription\n) from one business_entity\nto another.

Related Endpoints

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Unique identifier of the business_entity_transfer.\nChargebee automatically generates this.

", "maxLength" : 50, "example" : null }, "resource_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of the resource that was transferred.

\n* customer -

Represents the transfer of a customer\nresource.

\n* subscription -

Represents the transfer of a subscriptions\nresource linked to a customer\nresource.

", "enum" : [ "customer", "subscription" ], "example" : null }, "resource_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the deprecated version of the resource. This is the resource linked to the source business_entity\n.

", "maxLength" : 50, "example" : null }, "active_resource_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the active version of the resource. This is the resource linked to the destination business_entity\n.

", "maxLength" : 50, "example" : null }, "destination_business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the business_entity\nto which the resource has been transferred.

", "maxLength" : 50, "example" : null }, "source_business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the business_entity\nfrom which the resource has been transferred.

", "maxLength" : 50, "example" : null }, "reason_code" : { "type" : "string", "deprecated" : false, "description" : "The reason for transferring the resource to another business entity.\n\\* correction -\n\nCorrection of a wrongly assigned business entity.\n", "enum" : [ "correction" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this business entity transfer record was created.\n", "example" : null } }, "required" : [ "active_resource_id", "created_at", "destination_business_entity_id", "id", "reason_code", "resource_id", "resource_type", "source_business_entity_id" ], "example" : null }, "BusinessEntityUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "business_entity" : { "$ref" : "#/components/schemas/BusinessEntity" } }, "required" : [ "business_entity" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "BusinessProfile" : { "type" : "object", "example" : null }, "BusinessRule" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "latest_version" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "active" : { "type" : "boolean", "deprecated" : false, "example" : null }, "approval_status" : { "type" : "string", "default" : "not_required", "deprecated" : false, "enum" : [ "pending", "approved", "rejected", "not_required" ], "example" : null }, "released_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "created_by" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "tags" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "structured_expression" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "actions_on_success" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "actions_on_failure" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null } }, "required" : [ "active", "approval_status", "created_at", "created_by", "id", "name", "updated_at" ], "example" : null }, "CancelOption" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "end_of_term", "specific_date", "end_of_billing_term" ], "example" : null }, "Card" : { "type" : "object", "description" : "#### Deprecated\n\nThe [Payment Sources API](/docs/api/payment_sources)\n, with its additional options and improvements, obsoletes the Cards APIs. [Learn more](/docs/api/getting-started)\n.\n\nThe following table lists the Payment Sources API operations alongside the equivalent Card API operations: \n\n| API at Card resource | Use instead |\n|------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Retrieve card for a customer](/docs/api/cards/retrieve-card-for-a-customer) | [Retrieve a payment source](/docs/api/payment_sources/retrieve-a-payment-source) |\n| [Update card for a customer](/docs/api/cards/update-card-for-a-customer) | * [Create using temporary token](/docs/api/payment_sources/create-using-gateway-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) |\n| [Switch gateway](/docs/api/cards/switch-gateway) | [Switch gateway account](/docs/api/payment_sources/switch-gateway-account) |\n| [Copy card](/docs/api/cards/copy-card) | [Export payment source](/docs/api/payment_sources/export-payment-source) |\n| [Delete card for a customer](/docs/api/cards/delete-card-for-a-customer) | [Delete a payment source](/docs/api/payment_sources/delete-a-payment-source) |\n\n", "properties" : { "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the payment source\n", "maxLength" : 40, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of the card.\n\\* valid -\n\nA valid and active credit card\n\\* expiring -\n\nA card which is expiring in the current month.\n\\* expired -\n\nAn expired card\n", "enum" : [ "valid", "expiring", "expired" ], "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "Name of the gateway this payment source is stored with.\n\\* twikey -\n\nTwikey is a payment service provider that specializes in processing direct debit payments across the EU.\n\\* bluesnap -\n\nBlueSnap is a payment gateway.\n\\* jp_morgan -\n\nJ.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different [payment_source_type](/docs/api/payment_sources/payment_source-object#type). \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/jp-morgan-bacs&ref=feature) to enable the J.P. Morgan Mobility Payment Solutions gateway via payFURL for your test and live sites.\n\\* tco -\n\n2Checkout is a payment gateway.\n\\* payway -\n\nPayway is a payment gateway that enables secure card and payment acceptance.\n\\* moyasar -\n\nMoyasar is a fully integrated online payment service that makes accepting payments simple and secure.\n\\* deutsche_bank -\n\nDeutsche Bank is the leading German bank with strong European roots and a global network. \nThis feature is a **Private Beta Release**.\n\\* bluepay -\n\nBluePay is a payment gateway.\n\\* paypal_express_checkout -\n\nPayPal Express Checkout is a payment gateway.\n\\* paypal_payflow_pro -\n\nPayPal Payflow Pro is a payment gateway.\n\\* razorpay -\n\nRazorpay 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.\n\\* global_payments -\n\nGlobal Payments is a payment service provider.\n\\* dlocal -\n\nDlocal provides payment solutions for global commerce by accepting local payment methods.\n\\* not_applicable -\n\nIndicates that payment gateway is not applicable for this resource.\n\\* checkout_com -\n\nCheckout.com is a payment gateway.\n\\* adyen -\n\nAdyen is a payment gateway.\n\\* braintree -\n\nBraintree is a payment gateway.\n\\* nmi -\n\nNMI is a payment gateway.\n\\* worldpay -\n\nWorldPay is a payment gateway\n\\* paystack -\n\nPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/paystack&ref=feature) to enable Paystack for your test and live sites.\n\\* pay_com -\n\nPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n\\* moneris_us -\n\nMoneris USA is a payment gateway.\n\\* pin -\n\nPin is a payment gateway\n\\* authorize_net -\n\nAuthorize.net is a payment gateway\n\\* tempus -\n\nTempus Technologies is a payment gateway and payments technology provider offering secure payment processing with point-to-point encryption (P2PE) and tokenization.\n\\* stripe -\n\nStripe is a payment gateway.\n\\* moneris -\n\nMoneris is a payment gateway.\n\\* chargebee -\n\nChargebee test gateway.\n\\* cybersource -\n\nCyberSource is a payment gateway.\n\\* ecentric -\n\nEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n\\* first_data_global -\n\nFirst Data Global Gateway Virtual Terminal Account\n\\* exact -\n\nExact Payments is a payment gateway.\n\\* nuvei -\n\nNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/nuvei&ref=feature) to enable Nuvei for your test and live sites.\n\\* eway -\n\neWAY Account is a payment gateway.\n\\* metrics_global -\n\nMetrics global is a leading payment service provider providing unified payment services in the US.\n\\* amazon_payments -\n\nAmazon Payments is a payment service provider.\n\\* windcave -\n\nWindcave provides an end to end payment processing solution in ANZ and other leading global markets.\n\\* quickbooks -\n\nIntuit QuickBooks Payments gateway\n\\* wepay -\n\nWePay is a payment gateway.\n\\* ezidebit -\n\nEzidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \nThis feature is a **Private Beta Release**.\n\\* wirecard -\n\nWireCard Account is a payment service provider.\n\\* chargebee_payments -\n\nChargebee Payments gateway\n\\* sage_pay -\n\nSage Pay is a payment gateway.\n\\* elavon -\n\nElavon Virtual Merchant is a payment solution.\n\\* paypal_pro -\n\nPayPal Pro Account is a payment gateway.\n\\* orbital -\n\nChase Paymentech(Orbital) is a payment gateway.\n\\* paypal -\n\nPayPal Commerce is a payment gateway.\n\\* beanstream -\n\nBambora(formerly known as Beanstream) is a payment gateway.\n\\* hdfc -\n\nHDFC Account is a payment gateway.\n\\* ingenico_direct -\n\nWorldline Online Payments is a payment gateway.\n\\* ogone -\n\nIngenico ePayments (formerly known as Ogone) is a payment gateway.\n\\* migs -\n\nMasterCard Internet Gateway Service payment gateway.\n\\* vantiv -\n\nVantiv is a payment gateway.\n\\* bank_of_america -\n\nBank of America Gateway\n\\* eway_rapid -\n\neWAY Rapid is a payment gateway.\n\\* gocardless -\n\nGoCardless is a payment service provider.\n\\* mollie -\n\nMollie is a payment gateway.\n\\* paymill -\n\nPAYMILL is a payment gateway.\n\\* balanced_payments -\n\nBalanced is a payment gateway\n\\* solidgate -\n\nSolidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release**.\n\\* ebanx -\n\nEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which this payment source is stored with.\n", "maxLength" : 50, "example" : null }, "ref_tx_id" : { "type" : "string", "deprecated" : false, "description" : "Reference transaction id which used for transactions\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "iin" : { "type" : "string", "deprecated" : false, "description" : "The Issuer Identification Number, i.e. the first six digits of the card number\n", "maxLength" : 6, "minLength" : 6, "example" : null }, "last4" : { "type" : "string", "deprecated" : false, "description" : "Last four digits of the card number\n", "maxLength" : 4, "minLength" : 4, "example" : null }, "card_type" : { "type" : "string", "deprecated" : false, "description" : "Card type\n\\* cabal -\n\nA Cabal card.\n\\* hipercard -\n\nAn Hipercard.\n\\* dankort -\n\nA Dankort card.\n\\* bancontact -\n\nA Bancontact card.\n\\* american_express -\n\nAn American Express card.\n\\* maestro -\n\nA Maestro card.\n\\* mada -\n\nA Mada card.\n\\* nativa -\n\nA Nativa card.\n\\* cmr_falabella -\n\nA CMR Falabella card.\n\\* not_applicable -\n\nUsed for offline entries in transactions. Not applicable for cards\n\\* elo -\n\nA Elo card.\n\\* diners_club -\n\nA Diner's Club card.\n\\* discover -\n\nA Discover card.\n\\* other -\n\nCard belonging to types other than those listed above.\n\\* mastercard -\n\nA MasterCard.\n\\* jcb -\n\nA JCB card.\n\\* cartes_bancaires -\n\nA Cartes Bancaires card.\n\\* argencard -\n\nAn Argencard.\n\\* cencosud -\n\nA Cencosud card.\n\\* tarjeta_naranja -\n\nA Tarjeta Naranja card.\n\\* visa -\n\nA Visa card.\n\\* carnet -\n\nA Carnet card.\n\\* rupay -\n\nA Rupay card.\n", "enum" : [ "visa", "mastercard", "american_express", "discover", "jcb", "diners_club", "bancontact", "cmr_falabella", "tarjeta_naranja", "nativa", "cencosud", "cabal", "argencard", "elo", "hipercard", "carnet", "rupay", "maestro", "dankort", "cartes_bancaires", "mada", "other", "not_applicable" ], "example" : null }, "funding_type" : { "type" : "string", "deprecated" : false, "description" : "Card Funding type\n\\* credit -\n\nA credit card.\n\\* prepaid -\n\nA prepaid card.\n\\* debit -\n\nA debit card.\n\\* not_applicable -\n\nUsed for ACH. Not applicable for cards\n\\* not_known -\n\nAn unknown card.\n", "enum" : [ "credit", "debit", "prepaid", "not_known", "not_applicable" ], "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "[two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html)\nISO country code.\n", "maxLength" : 50, "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this card resource is created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this credit card resource was last updated.\n", "example" : null }, "ip_address" : { "type" : "string", "deprecated" : false, "description" : "The IP address of the customer. Used primarily for referral integration and EU VAT validation.\n", "maxLength" : 50, "example" : null }, "powered_by" : { "type" : "string", "deprecated" : false, "description" : "Card is powered by payment method.\n\\* card -\n\ncard\n\\* ideal -\n\nideal\n\\* payconiq -\n\npayconiq\n\\* sofort -\n\nsofort\n\\* bancontact -\n\nbancontact\n\\* giropay -\n\ngiropay\n\\* latam_local_card -\n\nlatam_local_card\n\\* not_applicable -\n\nnot_applicable\n", "enum" : [ "ideal", "sofort", "bancontact", "giropay", "card", "latam_local_card", "payconiq", "not_applicable" ], "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "masked_number" : { "type" : "string", "deprecated" : false, "description" : "Masked credit card number that is safe to show.\n", "maxLength" : 19, "example" : null } }, "required" : [ "created_at", "customer_id", "expiry_month", "expiry_year", "funding_type", "gateway", "iin", "last4", "payment_source_id", "status" ], "example" : null }, "CardAddedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CardDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CardExpiredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CardExpiryReminderEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CardUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Category" : { "type" : "string", "deprecated" : false, "enum" : [ "introductory", "promotional", "developer_determined" ], "example" : null }, "ChangeOption" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "end_of_term", "specific_date" ], "example" : null }, "Channel" : { "type" : "string", "deprecated" : false, "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "ChargeEntitlement" : { "type" : "object", "properties" : { "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "parent_entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "quantity" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "feature_name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, "example" : null }, "ChargeModel" : { "type" : "string", "deprecated" : true, "enum" : [ "full_charge", "prorate" ], "example" : null }, "ChargeOnEvent" : { "type" : "string", "deprecated" : false, "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination", "on_demand" ], "example" : null }, "ChargeOnOption" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "on_event" ], "example" : null }, "ChargebeeResponseSchemaType" : { "type" : "string", "deprecated" : false, "enum" : [ "plans_addons", "items", "compat" ], "example" : null }, "ChargesHandling" : { "type" : "string", "deprecated" : false, "enum" : [ "invoice_immediately", "add_to_unbilled_charges" ], "example" : null }, "ColumnDefinition" : { "type" : "object", "properties" : { "column_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "data_type" : { "type" : "string", "deprecated" : false, "enum" : [ "number", "string" ], "example" : null } }, "required" : [ "column_name", "data_type" ], "example" : null }, "Comment" : { "type" : "object", "description" : "Comments are additional information that you can add to your resources. Comments can be added to provide context for any operation that was performed.\n\nWhen you make an API call on any resource, for example, Subscriptions -\\> Change term end, you can add more context to that operation by calling the comments API as a follow up call.\n\nBesides the user generated comments, Chargebee also generates \"System\" comments when a change for a resource happens at the backend. These comments are all read-only.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier for the comment.\n", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Type of the entity this comment generated for\n\\* item -\n\nEntity that represents item\n\\* invoice -\n\nInvoice description\n\\* plan -\n\nEntity that represents a subscription plan\n\\* price_variant -\n\nEntity that represents a price variant\n\\* item_family -\n\nEntity that represents item family\n\\* transaction -\n\nEntity that represents a transaction.\n\\* quote -\n\nEntity that represents a quote\n\\* order -\n\nEntity that represents an order\n\\* item_price -\n\nEntity that represents item price\n\\* customer -\n\nEntity that represents a customer\n\\* business_entity -\n\nEntity that represents item of type business entity\n\\* coupon -\n\nEntity that represents a discount coupon\n\\* subscription -\n\nEntity that represents a subscription of a customer\n\\* addon -\n\nEntity that represents an addon\n\\* credit_note -\n\nCredit note description\n", "enum" : [ "customer", "subscription", "invoice", "quote", "credit_note", "transaction", "plan", "addon", "coupon", "order", "business_entity", "item_family", "item", "item_price", "price_variant" ], "example" : null }, "added_by" : { "type" : "string", "deprecated" : false, "description" : "The user who created the comment. If created via API, this contains the name given for the API key used.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Actual notes for the comment.\n", "maxLength" : 1000, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which this comment was created\n", "example" : null }, "type" : { "type" : "string", "default" : "user", "deprecated" : false, "description" : "Type of comment this is.\n\\* system -\n\nComment generated by Chargebee when any backend changes happen for an entity\n\\* user -\n\nComment generated by user either via API or Admin console.\n", "enum" : [ "user", "system" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the entity.\n", "maxLength" : 100, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [business entity](/docs/api/business_entities)\nassociated with this comment.\n", "maxLength" : 50, "example" : null } }, "required" : [ "created_at", "entity_id", "entity_type", "id", "notes", "type" ], "example" : null }, "Configuration" : { "type" : "object", "description" : "This resource returns your domain and product catalog version details - [Product Catalog 1.0](https://www.chargebee.com/docs/1.0/product-catalog.html)\n(v1) and [Product Catalog 2.0](https://www.chargebee.com/docs/2.0/product-catalog.html)\n(v2).\n", "properties" : { "domain" : { "type" : "string", "deprecated" : false, "description" : "

The Chargebee site\nfor which the information has been requested. It is the same as the value of {site}\nprovided as a path parameter.

", "maxLength" : 50, "example" : null }, "product_catalog_version" : { "type" : "string", "deprecated" : false, "description" : "The Product Catalog version of the site\n\\* v2 -\n\nIndicates Product Catalog 2.0\n\\* v1 -\n\nIndicates Product Catalog 1.0\n", "enum" : [ "v1", "v2" ], "example" : null }, "chargebee_response_schema_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the API response format based on the product catalog version of the site.\n\\* compat -\n\nThe response supports both Product Catalog 1.0 and 2.0 formats. It is applicable only to sites that have been automatically upgraded to Product Catalog 2.0.\n\\* items -\n\nThe response format follows [product catalog 2.0](https://www.chargebee.com/docs/billing/2.0/product-catalog/product-catalog)\n, using [items](/docs/api/items)\n.\n\\* plans_addons -\n\nThe response format follows [product catalog 1.0](https://www.chargebee.com/docs/billing/1.0/product-catalog/product-catalog)\n, using [plans](/docs/api/v2/pcv-1/plans)\nand [addons](/docs/api/v2/pcv-1/addons)\n.\n", "enum" : [ "plans_addons", "items", "compat" ], "example" : null } }, "example" : null }, "Contact" : { "type" : "object", "description" : "Contacts are the list of persons/organizations to whom billing and accounting emails will be sent.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for the contact.\n", "maxLength" : 150, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the contact.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the contact.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "Label/Tag provided for contact.\n", "maxLength" : 50, "example" : null }, "enabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Contact enabled / disabled\n", "example" : null }, "send_account_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Account Emails option is enabled for the contact.\n", "example" : null }, "send_billing_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Billing Emails option is enabled for the contact.\n", "example" : null } }, "required" : [ "email", "enabled", "id", "send_account_email", "send_billing_email" ], "example" : null }, "ContractTerm" : { "type" : "object", "description" : "

Subscriptions can run indefinitely or they may run for a fixed number of billing cycles. Subscription can have "contract terms", which define a lock-in period on the subscription for a certain number of billing cycles. This prevents the subscription from being canceled by the customer when it is within the contract term.

The contract term resource described below defines the properties of this lock-in period. This includes the number of billing cycles, the total contract value, the action to be taken at the end of the contract term, and so on. To allow for exceptions, you also have the option of terminating an active contract term and charging a termination fee.

A contract term starts in the active state and ends in the completed state. If the contract was canceled due to non-payment or other reasons, it can end in the canceled or terminated state. A given contract term is always associated with one, and only one subscription. A subscription, however, can be associated with only one active contract term. Over time, a subscription can be associated with several non-active contract terms. The active contract term for a subscription is available as an object within the subscription.

To enable and configure contract terms, follow these steps in the Chargebee UI:

    \n
  1. Click Settings on the left navigation.
  2. \n
  3. Click Configure Chargebee.
  4. \n
  5. Under Billing, click Contract Terms.
  6. \n
  7. Enable and configure the feature as needed.
  8. \n

Once contract terms have been configured, the following actions can be performed using the API:

Including a termination fee

When a contract is canceled mid-term, you can set a termination fee to be levied. Here's how:

    \n
  1. Create an item price for an item of type charge with price set to the termination fee.
  2. \n
  3. Do one of the following:
  4. \n

Once the above steps are done, the termination fee will be charged automatically if you terminate the contract in the middle of its term.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id that uniquely identifies the contract term in the site.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of contract\n\\* active -\n\nAn actively running contract term.\n\\* cancelled -\n\nThe contract term was ended because: - a change in the subscription caused a [subscription term reset](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#force_term_reset).\n\n* the subscription was cancelled due to non-payment.\n\n\\* terminated -\n\nThe contract term was terminated ahead of completion.\n\\* completed -\n\nThe contract term has run its full duration.\n", "enum" : [ "active", "completed", "cancelled", "terminated" ], "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the contract term\n", "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* renew - \n* evergreen -

Contract term completes and the subscription renews.

\n* 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.

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The sum of the totals\nof all the invoices raised as part of the contract term. For active\ncontract terms, this is a predicted value. The value depends on the type of currency.\nIf the subscription was imported\nwith the contract term, then this value includes the value passed for total_amount_raised\n.

", "minimum" : 0, "example" : null }, "total_contract_value_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "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\nis included in the calculation of the total contract value before tax. It's important to note that this value excludes any applicable taxes.

", "minimum" : 0, "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the contract term was created.\n", "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The [Id](/docs/api/subscriptions/subscription-object#id)\nof the subscription that this contract term is for.\n", "maxLength" : 50, "example" : null }, "remaining_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles remaining after the current one for the contract term. This attribute is only returned for active\ncontract terms.

", "minimum" : 0, "example" : null } }, "required" : [ "action_at_term_end", "billing_cycle", "contract_end", "contract_start", "created_at", "id", "status", "subscription_id", "total_contract_value", "total_contract_value_before_tax" ], "example" : null }, "ContractTermCancelOption" : { "type" : "string", "deprecated" : false, "enum" : [ "terminate_immediately", "end_of_contract_term", "specific_date", "end_of_subscription_billing_term" ], "example" : null }, "ContractTermCancelledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm" } }, "required" : [ "contract_term" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ContractTermCompletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm" } }, "required" : [ "contract_term" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ContractTermCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm" } }, "required" : [ "contract_term" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ContractTermRenewedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm" } }, "required" : [ "contract_term" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ContractTermTerminatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm" } }, "required" : [ "contract_term" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Coupon" : { "type" : "object", "additionalProperties" : true, "description" : "

Overview

Coupons are deductions applied to invoices or invoice line items. They're designed to be consumed by your customers directly. A coupon deduction can either be for a fixed amount or for a percentage of the amount of the invoice or line item.

Note:

If you wish to provide discounts to your customers via API or the Chargebee app, see Discounts API

Order of application of coupons and discounts

When both coupons and discounts are applied simultaneously to a subscription or one-time invoice, they're applied in the following order:

SummaryDescription
1Line-level, fixed amount couponscoupon with apply_on = each_specified_item and discount_type = flat
2Line-level, fixed amount discountsdiscount with apply_on = specific_item_price and type = fixed_amount
3Line-level, percentage couponscoupon with apply_on = each_specified_item and discount_type = percentage
4Line-level, percentage discountsdiscount with apply_on = specific_item_price and type = percentage
5Invoice-level, fixed amount couponscoupon with apply_on = invoice_amount and discount_type = flat
6Invoice-level, fixed amount discountsdiscount with apply_on = invoice_amount and type = fixed_amount
7Invoice-level, percentage couponscoupon with apply_on = invoice_amount and discount_type = percentage
8Invoice-level, percentage discountsdiscount with apply_on = invoice_amount and type = percentage

For example, consider the following scenario:

A subscription is created with:

The above coupons and discount are applied in the following order:

Discount or coupon appliedSubtotal at each step
1Initial subtotal (plan price + addon price)$200 + $20 = $220
21% off coupon on the addon$200 + $(20 - 0.02) = $200 + $19.98 = $219.98
3Flat $2 coupon on the invoice$219.98 - $2 = $217.98
4Flat $5 invoice discount$217.98 - $5 = $212.98
", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "Display name used in invoice. If it is not configured then name is used in invoice.\n", "maxLength" : 100, "example" : null }, "discount_type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "

Specifies the type of discount to be applied.

\n* percentage -

A percentage of the original price is deducted as a discount. The discount percentage is specified in discount_percentage.

\n

Learn more\nabout percentage\ncoupons.

\n* fixed_amount -

A fixed amount is deducted as a discount. The discount amount is specified in discount_amount.

\n

Learn more\nabout fixed_amount\ncoupons.

\n* offer_quantity -

A specified number of units of the item price are offered for free. The number of free units is specified in discount_quantity.\nThe offer_quantity\noption is valid only when apply_on\nis set to each_specified_item\nand the pricing_model\nof the item price is per_unit.

\n

Learn more\nabout offer_quantity\ncoupons.

", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "discount_percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "The percentage of the original amount that should be deducted from it.\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the deduction. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "discount_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the number of free units provided for the item price\n, without affecting the total quantity sold. This parameter is applicable only when the discount_type\nis set to offer_quantity\n.

", "minimum" : 1, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) of the coupon. Applicable for *fixed_amount*\ncoupons alone.\n", "maxLength" : 3, "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this coupon is attached to the subscription.

\n* forever -

The coupon is attached to the subscription and applied on the invoices until explicitly removed.

\n* one_time -

The coupon stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

\n* 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\nand period_unit\n.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "valid_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date from which the coupon can be applied to subscriptions.\n", "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date upto which the coupon can be applied to new subscriptions.\n", "example" : null }, "max_redemptions" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Maximum number of times this coupon can be redeemed. \n**Note:**\n\nIf not specified, the coupon can be redeemed an indefinite number of times.\n", "minimum" : 1, "example" : null }, "status" : { "type" : "string", "default" : "active", "deprecated" : false, "description" : "

Status of the coupon.

\n* future -

The coupon is scheduled to start at a future date and cannot be applied to a subscription. From the valid_from date, the status changes to active.

\n* expired -

Cannot be applied to a subscription. A coupon may expire due to exceeding max_redemptions\nor valid_till\ndate is past. Existing associations remain unaffected.

\n* archived -

Cannot be applied to a subscription. Existing associations remain unaffected.

\n* active -

Can be applied to a subscription.

\n* deleted -

Indicates the coupon has been deleted.

", "enum" : [ "active", "expired", "archived", "deleted", "future" ], "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the coupon is applied.

\n* invoice_amount -

The coupon is applied to the invoice sub_total\n.

\n* each_specified_item -

Applies the coupon to specified items (plans, addons, or charges), with the discount applied to each matching invoice.line_item.amount.

\n

Requires applicability to be configured using item_constraints—for example all, criteria, or specific with item_price_ids.

\n

When you attach this coupon to a subscription, at least one of that subscription's plans, addons, or charges must match those rules. If none do, the request fails.

", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this coupon is created.\n", "example" : null }, "archived_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this coupon was archived.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Timestamp indicating when this coupon was last updated.\nNote that this does not change when the redemptions\nattribute is changed. This attribute will be present only if the resource has been updated after 2016-11-09.

", "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the coupon is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period\n.

", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period. Applicable only when duration_type\nis limited_period\n.

\n* month -

A period of 1 calendar month.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "redemptions" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of times this coupon has been redeemed.\n", "minimum" : 0, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the coupon has been deleted or not.\n", "example" : null }, "item_constraints" : { "type" : "array", "deprecated" : false, "description" : "The list of item constraints.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_type" : { "type" : "string", "deprecated" : false, "description" : "Item type for which this criteria is applicable for.\n\\* charge -\n\nCharge\n\\* plan -\n\nPlan\n\\* addon -\n\nAddon\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "constraint" : { "type" : "string", "deprecated" : false, "description" : "Constraint applicable for the item\n\\* specific -\n\nCoupon applicable to specific items.\n\\* all -\n\nCoupon applicable to all items.\n\\* criteria -\n\nCoupon applicable based on criteria.\n\\* none -\n\nCoupon not applicable to any items.\n", "enum" : [ "none", "all", "specific", "criteria" ], "example" : null }, "item_price_ids" : { "type" : "array", "deprecated" : false, "description" : "List of item price ids for which this coupon is applicable.\n", "items" : { "example" : null }, "example" : null } }, "required" : [ "constraint", "item_type" ], "example" : null }, "example" : null }, "item_constraint_criteria" : { "type" : "array", "deprecated" : false, "description" : "The list of item constraint criteria.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_type" : { "type" : "string", "deprecated" : false, "description" : "Item type for which this criteria is applicable for.\n\\* charge -\n\nCharge is a type of item\n\\* plan -\n\nPlan is a type of item\n\\* addon -\n\nAddon is a type of item\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "currencies" : { "type" : "array", "deprecated" : false, "description" : "List of currencies ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) for which this coupon is applicable.\n", "items" : { "example" : null }, "example" : null }, "item_family_ids" : { "type" : "array", "deprecated" : false, "description" : "List of families for which this coupon is applicable.\n", "items" : { "example" : null }, "example" : null }, "item_price_periods" : { "type" : "array", "deprecated" : false, "description" : "List of frequencies for which this coupon is applicable. Allowed frequencies are \\[day, week, month, year\\].\n", "items" : { "example" : null }, "example" : null } }, "required" : [ "item_type" ], "example" : null }, "example" : null }, "coupon_constraints" : { "type" : "array", "deprecated" : false, "description" : "List of constraints applicable on the redemption of this coupon.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The resource type for the constraint. This, along with type\nand value\n, helps define the specific rule applied.

\n* customer -

The constraint is based on customer\nrecords.

", "enum" : [ "customer" ], "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

Type of coupon constraints

\n* unique_by -

Indicates - when entity_type\nis customer

\n\n* new_customer -

The coupon is applicable only for new customer(s). A customer will be considered as new_customer\nwhen they do not have any prior non-void, non-zero-dollar invoices.

\n* existing_customer -

The coupon is applicable only for existing customer(s). A customer will be considered as existing_customer\nwhen they have at least one non-void, non-zero-dollar invoice.

\n* 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\n, and the resource type is specified using entity_type.\nFor example, if entity_type\nis customer\nand value\nis 10\nthen the coupon can only be redeemed up to 10 times for any particular customer\nrecord.

", "enum" : [ "max_redemptions", "unique_by", "existing_customer", "new_customer" ], "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

The value of the coupon constraint. The possible values depend on the value of constraints[type]:

\n", "maxLength" : 65000, "example" : null } }, "required" : [ "entity_type", "type" ], "example" : null }, "example" : null } }, "required" : [ "apply_on", "created_at", "deleted", "discount_type", "duration_type", "id", "name" ], "example" : null }, "CouponCode" : { "type" : "object", "description" : "Coupon codes are used along with existing coupons in Chargebee. You can create a coupon set using a bunch of coupon codes and this coupon set will be associated with an existing coupon. A coupon code can only be applied to a single subscription and cannot be re-used.\n\nUsing coupon codes you can distribute several unique codes for a single main coupon, when you are running promotions.\n", "properties" : { "code" : { "type" : "string", "deprecated" : false, "description" : "Unique coupon code that can be redeemed only once.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "not_redeemed", "deprecated" : false, "description" : "Status of the coupon code.\n\\* not_redeemed -\n\nCan be applied to a subscription.\n\\* redeemed -\n\nCannot be applied to a subscription as the coupon code has been already used.\n\\* archived -\n\nCannot be applied to a subscription as it has been made inactive.\n", "enum" : [ "not_redeemed", "redeemed", "archived" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "Id of the main coupon resource.\n", "maxLength" : 100, "example" : null }, "coupon_set_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a coupon_set\n", "maxLength" : 50, "example" : null }, "coupon_set_name" : { "type" : "string", "deprecated" : false, "description" : "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.\n", "maxLength" : 50, "example" : null } }, "required" : [ "code", "coupon_id", "coupon_set_id", "coupon_set_name", "status" ], "example" : null }, "CouponCodesAddedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" }, "coupon_set" : { "$ref" : "#/components/schemas/CouponSet" } }, "required" : [ "coupon", "coupon_set" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CouponCodesDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" }, "coupon_set" : { "$ref" : "#/components/schemas/CouponSet" }, "coupon_code" : { "$ref" : "#/components/schemas/CouponCode" } }, "required" : [ "coupon", "coupon_code", "coupon_set" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CouponCodesUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" }, "coupon_set" : { "$ref" : "#/components/schemas/CouponSet" } }, "required" : [ "coupon", "coupon_set" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CouponCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" } }, "required" : [ "coupon" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CouponDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" } }, "required" : [ "coupon" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CouponSet" : { "type" : "object", "description" : "A coupon set contains a bunch of coupon codes that can be redeemed by your customers when they are checking out. It belongs to an existing coupon and will usually be combined with other coupons that share similar promotion or discount offers. Using this resource, you can create, update, retrieve, delete coupon sets and add coupon codes to a coupon set.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a coupon_set\n", "maxLength" : 50, "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "Coupon id linked to coupon set\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "Name of the coupon set\n", "maxLength" : 50, "example" : null }, "total_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "No of coupon codes present in coupon set\n", "example" : null }, "redeemed_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "No of redeemed codes\n", "example" : null }, "archived_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "No of archived codes\n", "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null } }, "required" : [ "coupon_id", "id", "name" ], "example" : null }, "CouponSetCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" }, "coupon_set" : { "$ref" : "#/components/schemas/CouponSet" } }, "required" : [ "coupon", "coupon_set" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CouponSetDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" }, "coupon_set" : { "$ref" : "#/components/schemas/CouponSet" } }, "required" : [ "coupon", "coupon_set" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CouponSetUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" }, "coupon_set" : { "$ref" : "#/components/schemas/CouponSet" } }, "required" : [ "coupon", "coupon_set" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CouponUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon" } }, "required" : [ "coupon" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CpqQuoteSignature" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "draft", "deprecated" : false, "enum" : [ "draft", "active", "signed", "expired", "cancelled", "declined" ], "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 255, "example" : null }, "document_name" : { "type" : "string", "deprecated" : false, "maxLength" : 255, "example" : null }, "customer_acceptance_method" : { "type" : "string", "default" : "esign_and_pay", "deprecated" : false, "enum" : [ "esign_and_pay", "esign", "pay" ], "example" : null }, "quote_type" : { "type" : "string", "default" : "consolidated", "deprecated" : false, "enum" : [ "consolidated", "detailed" ], "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "timezone" : { "type" : "string", "default" : "UTC", "deprecated" : false, "maxLength" : 100, "example" : null }, "provider_request_id" : { "type" : "string", "deprecated" : false, "maxLength" : 255, "example" : null }, "provider_document_id" : { "type" : "string", "deprecated" : false, "maxLength" : 255, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "customer_acceptance_method", "id", "modified_at", "quote_type", "status" ], "example" : null }, "CreditNote" : { "type" : "object", "additionalProperties" : true, "description" : "

A Credit Note is a document that specifies the money owed by a business to its customer. The seller usually issues a Credit Note for the same or lower amount than the invoice, and then repays the money to the customer or set it off against other 'due' invoices.

Credit Note Types

Credit notes in Chargebee are categorized into three types:\n1. adjustment: Adjustment credit notes are used to adjust the amount of an existing invoice in the payment_due or not_paid status. Use this type of credit note to reduce the invoice amount, typically as a discount to the customer.\nAdjustment credit notes are automatically created in the following cases:

Note:\nIf you have enabled consolidated invoicing\n, to know the subscriptions attached with a credit note you have to refer line_item's\nsubscription_id\n. The credit note's subscription_id\nshould not\nbe used (which will be null\nif the credit note has lines from multiple subscriptions).

Impact on reference invoice

The following updates are made to the reference invoice when a credit note is created/imported:

    \n
  • If the credit note type is adjustment:\n
      \n
    • The adjustment credit note details are added to the adjustment_credit_notes[] attribute of the invoice.
    • \n
    • The invoice amount_due is reduced by the credit note total.
    • \n
    • The invoice status is updated to paid if the invoice amount_due equals the credit note total.
    • \n
    • The invoice status does not change if the invoice amount_due is greater than credit note total.
    • \n
    \n
  • \n
  • If the credit note type is refundable:\n
      \n
    • The refundable credit note details are added to the issued_credit_notes[] attribute of the invoice.
    • \n
    • The invoice status does not change.
    • \n
    \n
  • \n
  • If the credit note type is store:\n
      \n
    • The store credit note details are added to the issued_credit_notes[] attribute of the invoice.
    • \n
    • The invoice status does not change.
    • \n
    \n
  • \n
", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Credit-note id.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the customer this credit note belongs to.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the subscription this Credit Note belongs to.\n**Note:**\nIf *consolidated invoicing*\nis enabled, to know the subscriptions attached with this Credit Note you have to refer [line_item's](/docs/api/credit_notes/credit_note-object#line_items)\n*subscription_id* .\nThis attribute should **not**\nbe used (which will be *null*\nif this credit note has lines from multiple subscriptions).\n", "maxLength" : 50, "example" : null }, "reference_invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the invoice against which this Credit Note is issued\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The credit note type. [Learn more](/docs/api/credit_notes/credit-note-object)\nabout credit note types.\n\\* store -\n\nStore Credit Note\n\\* refundable -\n\nRefundable Credit Note\n\\* adjustment -\n\nAdjustment Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "reason_code" : { "type" : "string", "deprecated" : false, "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-object#create_reason_code)\nparameter instead\\]\n\\* subscription_change -\n\nThis reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html)\nis enabled\n\\* order_change -\n\nOrder Change\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n\\* fraudulent -\n\nFRAUDULENT\n\\* chargeback -\n\nCan be set when you are recording your customer Chargebacks\n\\* subscription_pause -\n\nThis reason will be automatically set to credit notes created during pause/resume subscription operation.\n\\* waiver -\n\nWaiver\n\\* subscription_cancellation -\n\nThis reason will be set automatically for Credit Notes created during cancel subscription operation\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n\\* order_cancellation -\n\nOrder Cancellation\n\\* write_off -\n\nThis reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off)\noperation.\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The credit note status.\n\\* voided -\n\nWhen the Credit Note has been cancelled.\n\\* refund_due -\n\nWhen the credits are yet to be used, or have been partially used.\n\\* refunded -\n\nWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n\\* adjusted -\n\nWhen the Credit Note has been adjusted against an invoice.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "VAT number of the customer for whom this credit note is raised.\n", "maxLength" : 20, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date the credit note is issued.\n", "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of the credit note.\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the credit note\n", "maxLength" : 3, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Credit Note amount in cents.\n", "minimum" : 0, "example" : null }, "amount_allocated" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The amount allocated to invoices from the credit note.\n", "minimum" : 0, "example" : null }, "amount_refunded" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The refunds issued from this credit note.\n", "minimum" : 0, "example" : null }, "amount_available" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The yet to be used credits of this credit note.\n", "minimum" : 0, "example" : null }, "refunded_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time this credit note gets fully used. Please note that this field is not present when partial refunds are issued.\n", "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating the date and time this credit note gets voided.\n", "example" : null }, "generated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time when the credit note was raised. This date/time can be backdated, which means that the date/time can be earlier than the date/time the credit note was created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this credit note was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.\n", "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \nIn-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\nfor more information.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "line_items_next_offset" : { "type" : "string", "deprecated" : false, "description" : "

This attribute is returned only if additional resources are available. Use this value as the input parameter for line_items_offset to retrieve the next set of resources.

\n

Note:

", "maxLength" : 1000, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The Credit Note sub-total\n", "minimum" : 0, "example" : null }, "sub_total_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Invoice subtotal in the currency of the place of supply.\n", "minimum" : 0, "example" : null }, "total_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total invoice amount in the currency of the place of supply.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed.\n", "maxLength" : 3, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.\nIf there is no round-off amount\n, it will display 0\n.

", "maximum" : 99, "minimum" : -99, "example" : null }, "fractional_correction" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the fractional correction amount.\n", "maximum" : 50000, "minimum" : -50000, "example" : null }, "notes" : { "type" : "array", "deprecated" : false, "description" : "The list of notes attached to this credit note. Each note is displayed on customer-facing documents such as the [Credit Note PDF](/docs/api/credit_notes#retrieve_credit_note_as_pdf). Currently this list contains the note configured for the customer; additional note types may be added in future.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 3500, "example" : null }, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates that this resource has been deleted.\n", "example" : null }, "tax_category" : { "type" : "string", "deprecated" : false, "description" : "Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.\n", "example" : null }, "local_currency_exchange_rate" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "This parameter represents the exchange rate as a relative price of the base currency that appears as local currency in invoices and credit notes. The local currency exchange rate specifically refers to the exchange rate of a country's currency when converting it to another currency.\n\nFor example, if you want to convert US dollars to euros, the local currency exchange rate would be the rate at which you can convert US dollars to euros.\n", "maximum" : 1000000000, "minimum" : 0.0000000010, "example" : null }, "create_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive\n", "maxLength" : 100, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nof this credit_note. This is always the same as the business entity of the invoice referred to by reference_invoice_id.

\n", "maxLength" : 50, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "The line items of this credit note\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this line item belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this line item.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this line item.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the line item.\n", "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "

Quantity of the recurring item\nwhich is represented by this line item. For metered\nline items, this value is updated from usages\nonce when the invoice is generated as pending\nand finally when the invoice is closed\n.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this line item. Typically equals to unit amount x quantity\n", "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models)\nfor this item price.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether this line item is taxed or not\n", "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The tax amount charged for this item\n", "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "Rate of tax used to calculate tax for this lineitem\n", "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this line\n", "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Line Item-level discounts for this line.\n", "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the line item is for a metered item. If true, the item is metered; otherwise, it is non-metered.

", "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the line item is percentage-based.\n", "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Invoice Reference Line Item ID\n", "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this line item.\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this item.\n", "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason due to which the line item price/amount is exempted from tax.

\n* zero_value_item -

If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.

\n* reverse_charge -

If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only

\n* tax_not_configured -

If tax is not enabled for the site

\n* high_value_physical_goods -

If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied

\n* tax_not_configured_external_provider -

If the tax is not configured for the country in 3rd party tax provider.

\n* customer_exempt -

If the Customer is marked as Tax exempt

\n* region_non_taxable -

If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction

\n* product_exempt -

If the Plan or Addon is marked as Tax exempt

\n* zero_rated -

If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item

\n* export -

You are not registered for tax in the customer's region. This is also the reason code when both billing_address\nand shipping_address\nhave not been provided for the customer and subscription respectively

", "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this line item belongs to\n", "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for this line item\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discount(s) applied for each line item of this credit note.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique id of the line item that this deduction is for.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id\nis available as entity_id\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice. The entity_id\nis null\nin this case.

\n* item_level_coupon -

The deduction is due to a coupon applied to a line item of the invoice. The coupon id\nis available as entity_id\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on line items\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period end of the tax rate for the line item.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period start of the tax rate for the line item.\n", "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Indicates the prorated line item amount in cents.\n", "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The tax amount. This is set to the corresponding value on the invoice (invoice.line_item_taxes[i].tax_amount), prorated by the ratio of credit_note.total to invoice.total.

", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* state -\n\nThe tax jurisdiction is a state\n\\* county -\n\nThe tax jurisdiction is a county\n\\* country -\n\nThe tax jurisdiction is a country\n\\* city -\n\nThe tax jurisdiction is a city\n\\* special -\n\nSpecial tax jurisdiction.\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* other -\n\nJurisdictions other than the ones listed above.\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "line_item_addresses" : { "type" : "array", "deprecated" : false, "description" : "The list of addresses used for tax calculation on line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Line item reference\n", "maxLength" : 40, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address of the customer\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Name of the company\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "Name of the city\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address of the customer, specified as an [ISO 3166 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html).\nEntering an invalid code will return an error. \nIf [EU VAT](https://www.chargebee.com/docs/eu-vat.html) (2021 or later) or [Brexit configuration](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) is enabled, 'United Kingdom-Northern Ireland' is a valid option.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discounts applied to this credit note\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this deduction.\n", "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id of the line item that this deduction is for. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of discount that is applied to the line item. Relevant only when discounts[entity_type]\nis one of item_level_discount\n, item_level_coupon\n, document_level_discount\n, or document_level_coupon

\n* percentage -

when percentage is applied as discount

\n* fixed_amount -

when amount is applied as discount

", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "description" : "

The coupon code\n, if applicable, used to provide the discount. The coupon.id\nis available in entity_id\n.

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "description" : "The tax-lines of this credit note\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied. E.g. GST.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The tax amount. This is set to the corresponding value on the invoice (invoice.taxes[i].amount), prorated by the ratio of credit_note.total to invoice.total.

", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the tax item.\n", "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null }, "tax_origin" : { "type" : "object", "deprecated" : false, "description" : "contains information about the tax details which is applied on the invoice.\n", "properties" : { "country" : { "type" : "string", "deprecated" : false, "description" : "The country code in ([ISO 3166-1 alpha-2 format](https://www.iso.org/iso-3166-country-codes.html)\n) where the tax originated from.\n", "maxLength" : 50, "example" : null }, "registration_number" : { "type" : "string", "deprecated" : false, "description" : "It represents the tax registration number for the entity used to collect tax.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "linked_refunds" : { "type" : "array", "deprecated" : false, "description" : "Payment Refunds issued from this credit note\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "txn_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the transaction.\n", "maxLength" : 40, "example" : null }, "applied_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The transaction amount applied to this invoice\n", "minimum" : 0, "example" : null }, "applied_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time when the transaction amount applied to this invoice.\n", "example" : null }, "txn_status" : { "type" : "string", "deprecated" : false, "description" : "

The status of this transaction.

\n* needs_attention -

When connection with the Gateway gets terminated abruptly. For needs_attention\nstatus Chargebee automatically reconcile the transaction for few gateways, for rest of the gateways you have to use the Reconcile transaction API.\nYou can use this API to update the id_at_gateway\n(Gateway Transaction ID) and status\nfor a needs_attention\ntransaction to be reconciled at par with the gateway.

\n

Learn more\nabout needs_attention\ntransaction status

\n* voided -

The transaction got voided or authorization expired at gateway.

\n* late_failure -

Indicates that a successful payment transaction has failed now due to a late failure notification from the payment gateway, typically caused by issues like insufficient funds or a closed bank account.

\n* timeout -

Transaction failed because of Gateway not accepting the connection.

\n* success -

The transaction is successful.

\n* failure -

Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure

\n* in_progress -

Transaction is being processed by the gateway. This typically happens for direct debit transactions\nor, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.

", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "txn_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null }, "txn_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of the transaction\n", "minimum" : 0, "example" : null }, "refund_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive\n", "maxLength" : 100, "example" : null } }, "required" : [ "applied_amount", "applied_at", "txn_id" ], "example" : null }, "example" : null }, "linked_tax_withheld_refunds" : { "type" : "array", "deprecated" : false, "description" : "

The details of refunds recorded against the invoice.linked_taxes_withheld\ncomponent of the invoice\nassociated\nwith this credit_note.

\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

An auto-generated unique identifier for the tax withheld. The value starts with the prefix tax_wh_.\nFor example, tax_wh_16BdDXSlbu4uV1Ee6\n.

", "maxLength" : 40, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount withheld by the customer as tax from the invoice. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "The description for this tax withheld.\n", "maxLength" : 65000, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date or time associated with the tax withheld.\n", "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null } }, "required" : [ "id" ], "example" : null }, "example" : null }, "allocations" : { "type" : "array", "deprecated" : false, "description" : "Invoice allocations made from this credit note.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the invoice.\n", "maxLength" : 50, "example" : null }, "allocated_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount of this refund transaction.\n", "minimum" : 0, "example" : null }, "allocated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this refund occured.\n", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Closing date of the invoice. Typically this is the date on which invoice is generated\n", "example" : null }, "invoice_status" : { "type" : "string", "deprecated" : false, "description" : "

Current status of the invoice.

\n* not_paid -

Indicates the payment is not made and all attempts to collect is failed.

\n* paid -

Indicates a paid invoice.

\n* voided -

Indicates a voided invoice.

\n* posted -

Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period

\n* pending -

The invoice 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_invoicesattribute is set to true.\nThe invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.

\n* payment_due -

Indicates the payment is not yet collected and is being retried as per retry settings.

", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "tax_application" : { "type" : "string", "deprecated" : false, "description" : "Specifies how tax is handled for invoice allocations made from this credit note.\n\\* pre_tax -\n\nAllocations are applied before tax calculation.\n\\* post_tax -\n\nAllocations are applied after tax calculation.\n", "enum" : [ "pre_tax", "post_tax" ], "example" : null } }, "required" : [ "allocated_amount", "allocated_at", "invoice_id", "invoice_status" ], "example" : null }, "example" : null }, "exchange_rates" : { "type" : "array", "deprecated" : false, "description" : "

List of exchange rates applied when converting credit note amounts to other currencies (such as VAT local currency and organization local currency). Each entry contains currency_code and rate.

\n

The credit note currency is the base currency. When multiple rates target the same currency, only one entry is returned.

\n

This array is different from exchange_rate in the response. An entry whose currency_code matches local_currency_code uses the same rate as local_currency_exchange_rate.

\n

This array is returned in the response only when the corresponding features are enabled.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "currency_code" : { "type" : "string", "deprecated" : false, "description" : "Target currency for the conversion (ISO 4217). The credit note currency is the base currency.\n", "maxLength" : 3, "example" : null }, "rate" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "

Exchange rate applied as: 1 currency_code = rate credit note currency.

\n

For example, when the credit note currency is USD, currency_code is INR, and rate is 0.010448403, then 1 INR = 0.010448403 USD.

", "maximum" : 1000000000, "minimum" : 0.0000000010, "example" : null } }, "required" : [ "currency_code", "rate" ], "example" : null }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Shipping address for the credit note.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Billing address for the credit note.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "einvoice" : { "type" : "object", "deprecated" : false, "description" : "An e-invoice or electronic invoice is a structured representation of an invoice that is interoperable between computerized invoicing systems. Depending on the country, e-invoicing can be necessary to meet financial/taxation authority regulations.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id\nfor the e-invoice. This is auto-generated by Chargebee.

", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier returned by the connected e-invoicing provider for this submission (for example, a document submission id). Chargebee uses this value when communicating with the provider to retrieve submission status and related artifacts.\n", "maxLength" : 50, "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "This attribute is used to populate the unique reference number assigned to an invoice on the Invoice Registration Portal (IRP) network. It is essential for identifying and tracking invoices that are processed through the IRP network.\n\nIn the future, this field may be used to store similar reference numbers for other networks.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of processing the e-invoice. To obtain detailed information about the current status\n, see message\n.

\n* message_acknowledgement -

An acknowledgment confirming that the application response was successfully received by the receiving entity.

\n* under_query -

The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.

\n* rejected -

The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.

\n* scheduled -

Sending the e-invoice to the customer has been scheduled.

\n* paid -

The receiving entity has confirmed that the e-invoice has been paid.

\n* conditionally_accepted -

The e-invoice has been accepted with conditions.

\n* accepted -

The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.

\n* skipped -

The e-invoice was not sent. This could be due to missing information or because the entity_identifier\nis not registered on the e-invoicing network.

\n* success -

The e-invoice has been successfully delivered to the customer.

\n* failed -

The e-invoice was sent and there was an error due to which it was not delivered.

\n* in_progress -

The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.

\n* in_process -

The e-invoice is currently being processed by the receiving entity.

\n* 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", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "message" : { "type" : "string", "deprecated" : false, "description" : "

Detailed information about the status of the e-invoice. When status\nis skipped\nor failed\n, this contains the reason or error details. The following are some valid examples:

\n", "maxLength" : 3000, "example" : null }, "provider_references" : { "type" : "array", "deprecated" : false, "description" : "List of key-value pairs from the e-invoicing provider (e.g. Receipt Message ID).\n", "items" : { "example" : null }, "example" : null } }, "required" : [ "id", "status" ], "example" : null }, "site_details_at_creation" : { "type" : "object", "deprecated" : false, "description" : "It contains site-specific information, including timezone and organisational address.\n", "properties" : { "timezone" : { "type" : "string", "deprecated" : false, "description" : "It represents the timezone of the site at the time of entity creation.\n", "maxLength" : 50, "example" : null }, "organization_address" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

It represents the address configured for the site during entity creation. Includes currency_code (ISO 4217): the currency of the organisation address country at creation time.

", "example" : null } }, "example" : null } }, "required" : [ "currency_code", "customer_id", "deleted", "id", "price_type", "status", "sub_total", "type" ], "example" : null }, "CreditNoteCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote" } }, "required" : [ "credit_note" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CreditNoteCreatedWithBackdatingEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote" } }, "required" : [ "credit_note" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CreditNoteDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote" } }, "required" : [ "credit_note" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CreditNoteEstimate" : { "type" : "object", "properties" : { "reference_invoice_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "amount_allocated" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "amount_available" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null } }, "required" : [ "amount_allocated", "amount_available", "currency_code", "price_type", "reference_invoice_id", "sub_total", "total", "type" ], "example" : null }, "CreditNoteUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote" } }, "required" : [ "credit_note" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CreditOptionForCurrentTermCharges" : { "type" : "string", "deprecated" : false, "enum" : [ "none", "prorate", "full", "consumption_based" ], "example" : null }, "CreditType" : { "type" : "string", "default" : "general", "deprecated" : false, "enum" : [ "loyalty_credits", "referral_rewards", "general" ], "example" : null }, "CreditUnit" : { "type" : "object", "description" : "Credit units power credit-based billing for usage-based products, letting you get paid upfront while customers spend credits as they use your product's features. Each credit unit is a customizable consumption unit, such as AI credits or API calls, that you define beyond Chargebee's built-in pricing dimensions.\n\nWhen should you use credit units?\n---------------------------------\n\nCredit units are a good fit when:\n\n* Customers have widely varying usage patterns\n* Business costs scale with consumption\n* Upfront cash flow is preferred\n\nHow does it work?\n-----------------\n\n1. Create a credit unit (say, \"AI Credits\")\n2. Configure credit grants on your plans (e.g., a Pro Plan priced at $20 USD includes 100 AI Credits)\n3. Track customer usage in real time\n4. Bill for actual consumption\n\n**What happens when credits are exhausted?**\n\nOnce the provisioned credits are exhausted, further consumption draws from the overdraft balance up to its configured limit. Configure overdraft behavior for a credit unit using [**is_unlimited**](#is_unlimited) and [**overdraft_amount**](#overdraft_amount), so customers can continue consuming, purchase more, or pay for overage depending on your setup.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the credit unit.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "Internal display name for the credit unit. This must be unique across the site.\n", "maxLength" : 50, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "

Customer-facing display name for the credit unit. This must be unique across the site.\nIf not provided during creation, name is used as the default.

", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The current lifecycle status of the credit unit.\n\\* active -\n\nGrant configuration for items and grant configuration overrides at subscription layer can be created for active credit units.\n\\* archived -\n\nGrant configuration for items and grant configuration overrides at subscription layer cannot be created for archived credit units. Already configured grants for credit units continue to be effective.\n", "enum" : [ "active", "archived" ], "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the credit unit was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the credit unit was created.\n", "example" : null }, "created_by" : { "type" : "string", "deprecated" : false, "description" : "The source (or the user) from where the credit unit has been created.\n", "maxLength" : 100, "example" : null }, "updated_by" : { "type" : "string", "deprecated" : false, "description" : "The source (or the user) from where the credit unit has been last updated.\n", "maxLength" : 100, "example" : null }, "is_unlimited" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether this credit unit allows unlimited overdraft consumption. When true, grace consumption continues without a cap after the allocated grants are exhausted. When false, grace consumption is capped by overdraft_amount.

", "example" : null }, "overdraft_amount" : { "type" : "string", "deprecated" : false, "description" : "

The amount up to which grace consumption is allowed after the allocated grants are exhausted. A positive decimal value that applies only when is_unlimited is false.

", "maxLength" : 50, "example" : null } }, "required" : [ "created_at", "external_name", "id", "is_unlimited", "name" ], "example" : null }, "CsvTaxRule" : { "type" : "object", "properties" : { "tax_profile_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "default" : "*", "deprecated" : false, "maxLength" : 50, "example" : null }, "zip_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "zip_code_start" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "zip_code_end" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "tax1_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax1_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "tax1_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax1_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax1_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax2_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax2_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "tax2_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax2_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax2_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax3_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax3_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "tax3_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax3_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax3_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax4_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax4_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "tax4_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax4_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax4_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "active", "expired", "scheduled" ], "example" : null }, "time_zone" : { "type" : "string", "deprecated" : false, "maxLength" : 4, "example" : null }, "valid_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "service_type" : { "type" : "string", "deprecated" : false, "enum" : [ "digital", "other", "not_applicable" ], "example" : null }, "rule_weight" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "overwrite" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, "required" : [ "overwrite", "tax1_name", "tax1_rate" ], "example" : null }, "Currency" : { "type" : "object", "description" : "

Chargebee's Multi-currency feature allows you to create Plans in multiple currencies, enabling your customers to conveniently pay in their preferred local currency. Please review this documentation to understand the multi-currency feature in Chargebee.

This currency resource contains exchange rate configurations associated with a specific currency. The multi-currency feature must be enabled, and all prerequisites must be addressed to successfully add a new currency via the API.\nTo invoke a single currency-specific API like update, retrieve, and more, the currency ID has to be passed as a path parameter. You can use list API to fetch the IDs of each currency configured in your site to use with the currency-specific APIs below. Chargebee supports billing in over 100 currencies.\nOn this page, you can find information about how currency units are expressed in the API, as well as some pointers to keep in mind when using multiple currencies.

Currency values

By default, the Chargebee API supports only whole numbers for currency values. To allow for fractional (decimal) values, you must enable the multi-decimal pricing feature. Additionally, the units in which currencies are expressed in the API depend on whether the currency is zero-decimal and whether multi-decimal pricing is enabled.

Whole number currency values

By default, Chargebee supports currency values in whole numbers; fractions are not supported. In the API, currency values can be identified by checking their data types. For all whole number currency values in this API, the data type is indicated as "in cents" in this documentation.

The specific unit used for the currency in the API depends on whether it is a zero-decimal currency:

Fractional currency values

When multi-decimal pricing is enabled in Chargebee, you can work with fractional currency values using dedicated API parameters and attributes of the String type. Usually, these attributes and parameters have the suffix _in_decimal in their names. The value is expressed in the major unit of the currency, which is the unit represented by its ISO 4217 code. For example, $1.6782 should be provided as 1.6782. The maximum number of decimal places supported by the API can be configured in the admin console.

Note: For zero-decimal currencies, such as the Japanese Yen (JPY), decimal places are not allowed.

Rounding of invoice line item amounts

While Chargebee supports multiple decimal places for currency values, at the invoice line item\n-level, the amount\nattribute is always rounded off to two decimal places in the major unit of the currency. The major unit of a currency is the unit represented by its\nISO 4217 code\n.

The rounding logic used is ROUND_HALF_EVEN\n. For example, if the quantity\nis 0.0765 and unit_amount\nis $10.674, the line item amount\nis (0.0765 x $10.674) = $0.816561 and is rounded off to $0.82.

Multi-currency support

By default, Chargebee is able to process transactions in only one currency. However, you can enable the multi-currency feature to support more currencies. The first currency enabled in Chargebee also becomes the "base currency" by default. If you have multiple currencies enabled and want to change the base currency for your site, reach out to Support for assistance.

Warning

For some API endpoints, the currency_code parameter becomes required when the multi-currency feature is enabled. Before enabling the feature for your site, ensure that you update your code to provide the currency_code parameter when calling the endpoints listed in the next section.

List of affected endpoints

The following endpoints require the currency_code\nparameter to be passed when the multi-currency feature has been enabled.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of a currency.\n", "maxLength" : 40, "example" : null }, "enabled" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "

This field mentions whether the foreign currency is active or archived. If the value is false\nthe foreign currency is archived else it is active.

", "example" : null }, "forex_type" : { "type" : "string", "deprecated" : false, "description" : "

This represents the exchange rate type set for the currency.

\n* auto -

If forex_type\nis auto\n, conversion rate will be auto updated by Chargebee every day with third party providers (using external currency conversion providers).

\n* manual -

If forex_type\nis manual\n, you will be able to set the conversion rate for the currency. You need to update the exchange rate each time your exchange rate provider changes it.

", "enum" : [ "manual", "auto" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "A three letter currency code. For example, GBR, INR, and more.\n", "maxLength" : 3, "example" : null }, "is_base_currency" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Check whether this is a base currency or not. The value of the attribute is true\nwhen the currency matches the site's base currency.

", "example" : null }, "manual_exchange_rate" : { "type" : "string", "deprecated" : false, "description" : "

This attribute shows the exchange rate in decimal. When forex_type\nis manual\nyou have to set the exchange rate for additional currencies in manual_exchange_rate\nfield.

", "maxLength" : 20, "example" : null } }, "required" : [ "currency_code", "enabled", "id", "is_base_currency" ], "example" : null }, "CustomFieldConfig" : { "type" : "object", "description" : "This resource represents the configuration for a specific [custom field](/docs/api/advanced-features#custom-fields).\n", "properties" : { "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Entity type that this configuration applies to.\n\\* item -\n\nItem entity.\n\\* invoice -\n\nInvoice entity.\n\\* omnichannel_one_time_order -\n\nOmnichannel one-time order entity.\n\\* subscription_entitlement -\n\nSubscription entitlement entity.\n\\* plan -\n\nPlan entity.\n\\* price_variant -\n\nPrice variant entity.\n\\* sales_order -\n\nSales order entity.\n\\* omnichannel_subscription_item_scheduled_change -\n\nScheduled change for an omnichannel subscription item entity.\n\\* transaction -\n\nTransaction entity.\n\\* quote -\n\nQuote entity.\n\\* plan_price -\n\nPlan price entity.\n\\* customer -\n\nCustomer entity.\n\\* business_rule -\n\nBusiness rule entity.\n\\* differential_price -\n\nDifferential price entity.\n\\* attached_item -\n\nAttached item entity.\n\\* coupon -\n\nCoupon entity.\n\\* subscription -\n\nSubscription entity.\n\\* addon -\n\nAddon entity.\n\\* addon_price -\n\nAddon price entity.\n\\* charge_item -\n\nCharge item entity.\n\\* feature -\n\nFeature entity.\n\\* omnichannel_transaction -\n\nOmnichannel transaction entity.\n\\* item_entitlement -\n\nItem entitlement entity.\n\\* usage_file -\n\nUsage file entity.\n\\* addon_item -\n\nAddon item entity.\n\\* charge_price -\n\nCharge price entity.\n\\* item_family -\n\nItem family entity.\n\\* ruleset -\n\nRuleset entity.\n\\* plan_item -\n\nPlan item entity.\n\\* order -\n\nOrder entity.\n\\* item_price -\n\nItem price entity.\n\\* omnichannel_subscription -\n\nOmnichannel subscription entity.\n\\* omnichannel_subscription_item -\n\nOmnichannel subscription item entity.\n\\* omnichannel_one_time_order_item -\n\nOmnichannel one-time order item entity.\n\\* business_entity -\n\nBusiness entity.\n\\* recorded_purchase -\n\nRecorded purchase entity.\n\\* credit_note -\n\nCredit note entity.\n", "enum" : [ "customer", "subscription", "invoice", "quote", "credit_note", "transaction", "plan", "addon", "coupon", "order", "item_family", "item", "item_price", "plan_item", "addon_item", "charge_item", "plan_price", "addon_price", "charge_price", "differential_price", "attached_item", "feature", "subscription_entitlement", "item_entitlement", "business_entity", "price_variant", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_transaction", "recorded_purchase", "omnichannel_subscription_item_scheduled_change", "sales_order", "omnichannel_one_time_order", "omnichannel_one_time_order_item", "usage_file", "business_rule", "ruleset", "alert_status", "omnichannel_subscription_item_metric" ], "example" : null }, "api_name" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier for the custom field, used in API requests and responses.\n", "maxLength" : 50, "example" : null }, "display_name" : { "type" : "string", "deprecated" : false, "description" : "Name of the field as it appears in the user interface.\n", "maxLength" : 50, "example" : null }, "field_datatype" : { "type" : "string", "deprecated" : false, "description" : "Data type of the custom field value.\n\\* double -\n\nDouble-precision number.\n\\* long -\n\nInteger (long).\n\\* timestamp -\n\nTimestamp value.\n\\* date -\n\nDate value.\n\\* email -\n\nEmail address.\n\\* url -\n\nURL value.\n\\* string -\n\nString value.\n", "enum" : [ "string", "long", "double", "timestamp", "email", "url", "date" ], "example" : null }, "edit_ui" : { "type" : "string", "deprecated" : false, "description" : "UI component type used to input or edit the field value.\n\\* radio_button_horizontal -\n\nHorizontal radio button group.\n\\* radio_button_vertical -\n\nVertical radio button group.\n\\* text_area -\n\nMulti-line text input.\n\\* text -\n\nSingle-line text input.\n\\* date_field -\n\nDate picker input.\n\\* date_time_field -\n\nDate and time picker input.\n\\* password -\n\nPassword input (masked).\n\\* drop_down -\n\nDropdown select input.\n\\* check_box -\n\nCheck box input.\n\\* file -\n\nFile upload input.\n", "enum" : [ "text", "text_area", "date_time_field", "drop_down", "radio_button_horizontal", "radio_button_vertical", "date_field", "check_box", "file", "password" ], "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the custom field.\n", "maxLength" : 250, "example" : null }, "required" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the custom field is mandatory or optional.\n", "example" : null }, "props" : { "type" : "string", "deprecated" : false, "description" : "JSON object containing additional properties for the field (for example, options for a dropdown).\n", "maxLength" : 5000, "example" : null }, "field_order" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Display order of the field in the user interface.\n", "example" : null }, "status" : { "type" : "string", "default" : "active", "deprecated" : false, "description" : "Whether the custom field configuration is active or archived.\n\\* archived -\n\nOnly available in the index list page; soft deleted.\n\\* active -\n\nVisible and ready to use.\n", "enum" : [ "active", "archived" ], "example" : null }, "published_status" : { "type" : "string", "default" : "new", "deprecated" : false, "description" : "Publishing status of the custom field configuration.\n\\* new -\n\nNew configuration not yet published.\n\\* draft -\n\nConfiguration is in draft and not yet published.\n\\* published -\n\nConfiguration is published and in use.\n", "enum" : [ "new", "published", "draft" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the custom field configuration was created.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the custom field configuration was last updated.\n", "example" : null } }, "required" : [ "api_name", "created_at", "display_name", "entity_type", "field_datatype", "modified_at", "props", "published_status", "required", "status" ], "example" : null }, "CustomPricingUnit" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "active", "archived" ], "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "created_by" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "updated_by" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "is_unlimited" : { "type" : "boolean", "deprecated" : false, "example" : null }, "overdraft_amount" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, "required" : [ "created_at", "external_name", "id", "is_unlimited", "name" ], "example" : null }, "Customer" : { "type" : "object", "additionalProperties" : true, "description" : "

Represents a customer, which can be an individual or organization that subscribes to your products or services. The customer resource associates with subscriptions, card information, and billing addresses. The customer details include their ID, name, contact information, and any custom attributes you'd like to associate with them.

Breaking Change:

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the customer resource. You have the option to specify this value when creating a customer. If not specified, Chargebee automatically generates a unique identifier.

\n

Tip\nWhen the customer resource is transferred to a different business_entity, Chargebee assigns a new random identifier to the id attribute. The original identifier is preserved for the transferred copy of the customer resource. (See also: Mechanics of business entity transfer.)

\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "

The VAT/tax registration number for the customer. For customers with billing_address

\n

country\nas\nXI\n(which is United Kingdom - Northern Ireland\n), the first two characters of the full VAT number\ncan be overridden by setting\nvat_number_prefix\n.

", "maxLength" : 20, "example" : null }, "auto_collection" : { "type" : "string", "default" : "on", "deprecated" : false, "description" : "

When the customer has a payment_method\nof type\ncard\n, this attribute determines whether to automatically charge the card whenever an invoice status\nis payment_due\n.

\n

Note\nThis setting can be overridden for individual subscriptions of the customer.

\n* on -

Chargebee automatically charges the card for invoices that enter payment_due\nstatus\n.

\n* off -

Automatic charging is disabled; manual payment is required for due invoices.

", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the customer.\n\\* sepa_credit -\n\nSEPA Credit\n\\* cash -\n\nCash\n\\* no_preference -\n\nNo Preference\n\\* bank_transfer -\n\nBank Transfer\n\\* check -\n\nCheck\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* custom -\n\nCustom\n\\* boleto -\n\nBoleto\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n", "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" ], "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

\n", "example" : null }, "vat_number_validated_time" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Returns the recent VAT number validation time.\n", "example" : null }, "vat_number_status" : { "type" : "string", "deprecated" : false, "description" : "Represents the VAT validation status. This is applicable if you have configured EU, UK or Australian taxes and the [VAT number validation](https://www.chargebee.com/docs/2.0/uk-vat.html#uk-vat-validation)\nis enabled.\n\\* not_validated -\n\nThis status is only applicable for countries in European Zone. This is applicable when both the customer's billing address and the organization's address should be of the same European Zone and EU tax should be configured with the \"Also validate VAT Number for Country of Business\" option in the disabled status.\n\\* undetermined -\n\nWhen Chargebee is not able to validate the VAT number it is stored as 'undetermined'. This can occur due to reasons like service outage etc. VAT numbers with 'undetermined' status will be in queue for validation on daily basis.\n\\* valid -\n\nIf the given VAT number is valid.\n\\* invalid -\n\nIf the given VAT number is invalid.\n", "enum" : [ "valid", "invalid", "not_validated", "undetermined" ], "example" : null }, "allow_direct_debit" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the customer can pay via Direct Debit\n", "example" : null }, "is_location_valid" : { "type" : "boolean", "deprecated" : false, "description" : "

Note\nApplicable only when the customer's billing_address.country is New Zealand, Australia, or in the EU.

\n

When the customer uses a card payment source, this attribute specifies whether the country of the customer and the card issuer are the same.\nThe following three location indicators are compared:

\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this customer resource is created.\n", "example" : null }, "created_from_ip" : { "type" : "string", "deprecated" : false, "description" : "

The IP address of the customer when this customer record was created. It's mainly used for referral integrations and validating VAT if the customer is in the EU or UK.\nDepending on the method used to create the customer record, the field is set as follows:

\n", "maxLength" : 50, "example" : null }, "exemption_details" : { "type" : "array", "deprecated" : false, "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)\nintegration.\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.\n", "items" : { "example" : null }, "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "

Specifies if the customer is liable for tax

\n* taxable -

Computes tax for the customer based on the site configuration.\nIn 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.

\n* exempt - ", "enum" : [ "taxable", "exempt" ], "example" : null }, "entity_code" : { "type" : "string", "deprecated" : false, "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)\n.\n\\* l -\n\nOther or custom\n\\* m -\n\nEducational organization\n\\* n -\n\nLocal government\n\\* h -\n\nCommercial agricultural production\n\\* i -\n\nIndustrial production/manufacturer\n\\* j -\n\nDirect pay permit\n\\* k -\n\nDirect mail\n\\* p -\n\nCommercial aquaculture\n\\* q -\n\nCommercial Fishery\n\\* r -\n\nNon-resident\n\\* d -\n\nForeign diplomat\n\\* e -\n\nCharitable or benevolent organization\n\\* f -\n\nReligious organization\n\\* g -\n\nResale\n\\* a -\n\nFederal government\n\\* b -\n\nState government\n\\* c -\n\nTribe/Status Indian/Indian Band\n\\* med2 -\n\nUS Medical Device Excise Tax with taxable sales tax\n\\* med1 -\n\nUS Medical Device Excise Tax with exempt sales tax\n", "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "exempt_number" : { "type" : "string", "deprecated" : false, "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)\n.\n", "maxLength" : 100, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this customer was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.\n", "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "billing_date" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Note\nApplicable only when Calendar Billing with support for customer-specific billing date is enabled and billing_date_mode is manually_set.

\n

Specifies the day of the month for subscription renewals on month-based or year-based plans. Month-based and year-based plans are item_price\nresources where the item_type\nis set to plan\nand period_unit\nis set to month\nand year\nrespectively.

\n

Example

", "maximum" : 31, "minimum" : 1, "example" : null }, "billing_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Note\nApplicable only when Calendar Billing with support for customer-specific billing date is enabled and billing_date_mode is manually_set.

\n

Specifies the renewal month for subscriptions on year-based plans. Year-based plans are item_price\nresources where item_type\nis set to plan\nand period_unit\nis set to year.

\n

Example\nThe renewal date is 15th July when billing_date is 15 and billing_month is 7.

", "maximum" : 12, "minimum" : 1, "example" : null }, "billing_date_mode" : { "type" : "string", "deprecated" : false, "description" : "

Note\nApplicable only when Calendar Billing with support for customer-specific billing date is enabled and billing_date_mode is manually_set.

\n

Indicates whether this customer's billing_date\nand billing_month\nvalues can be changed via the Change billing date API\n.

\n* manually_set -

billing_date\nand billing_month\ncan be adjusted via API.

\n* using_defaults -

billing_date\nand billing_month\nare fixed as per Chargebee site settings\nand not modifiable via API.

", "enum" : [ "using_defaults", "manually_set" ], "example" : null }, "billing_day_of_week" : { "type" : "string", "deprecated" : false, "description" : "Applicable when *calendar billing*\n(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.\n\\* saturday -\n\nSaturday\n\\* monday -\n\nMonday\n\\* friday -\n\nFriday\n\\* sunday -\n\nSunday\n\\* wednesday -\n\nWednesday\n\\* thursday -\n\nThursday\n\\* tuesday -\n\nTuesday\n", "enum" : [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ], "example" : null }, "billing_day_of_week_mode" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether this customer's *billing_day_of_week*\nvalue is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_day_of_week*\nwill not be reset even when all of the weekly subscriptions are cancelled.\n\\* using_defaults -\n\nBilling date is set based on defaults configured.\n\\* manually_set -\n\nBilling date is specifically set (default configuration is overridden)\n", "enum" : [ "using_defaults", "manually_set" ], "example" : null }, "pii_cleared" : { "type" : "string", "default" : "active", "deprecated" : false, "description" : "Indicates whether this customer's personal information has been cleared\n\\* cleared -\n\nCleared\n\\* scheduled_for_clear -\n\nScheduled For Clear\n\\* active -\n\nActive\n", "enum" : [ "active", "scheduled_for_clear", "cleared" ], "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "Override for this customer, the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing)\nfor 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/subscription-object#auto_close_invoices)\nwhich takes precedence.\n", "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \nIn-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\nfor more information.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "active_id" : { "type" : "string", "deprecated" : false, "description" : "

Note: Present only when the customer has been transferred between business entities.

\n

Represents the id of the active version of the customer resource.

\n

Tip: If the id and active_id of a customer resource are the same, this indicates that you are working with the active version of that customer resource.

\n", "maxLength" : 50, "example" : null }, "fraud_flag" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether or not the customer has been [identified as fraudulent](https://www.chargebee.com/docs/payments/2.0/fraud-management/chargebee-fraud-management).\n\\* suspicious -\n\nThe customer has been identified as potentially fraudulent by the gateway\n\\* safe -\n\nThe customer has been marked as safe\n\\* fraudulent -\n\nThe customer has been marked as fraudulent\n", "enum" : [ "safe", "suspicious", "fraudulent" ], "example" : null }, "primary_payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "The [identifier](/docs/api/payment_sources/payment_source-object#id)\nof the customer's [primary payment source](https://www.chargebee.com/docs/2.0/payment-method-overview.html#primary-and-backup-payment-methods)\n", "maxLength" : 40, "example" : null }, "backup_payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "The [identifier](/docs/api/payment_sources/payment_source-object#id)\nof the customer's [backup payment source](https://www.chargebee.com/docs/2.0/payment-method-overview.html#primary-and-backup-payment-methods)\n.\n", "maxLength" : 40, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A note for the customer that appears on all their invoice PDFs. This is one of [several notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the [business entity](/docs/api/advanced-features)\nof this subscription. This is always the same as the [business entity](/docs/api/subscriptions/subscription-object#customer_id)\nof the customer.\n", "maxLength" : 50, "example" : null }, "preferred_currency_code" : { "type" : "string", "deprecated" : false, "description" : "**Note**\nApplicable only when the [Multi-Currency](https://www.chargebee.com/docs/2.0/multi-currency-pricing.html) feature is enabled.\n\nSpecifies the customer's preferred currency in [ISO 4217](https://www.chargebee.com/docs/supported-currencies.html)\nformat.\n", "maxLength" : 3, "example" : null }, "promotional_credits" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The balance of [promotional credits](/docs/api/promotional_credits)\navailable to the customer.\n", "minimum" : 0, "example" : null }, "unbilled_charges" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total unbilled charges for this customer\n", "minimum" : 0, "example" : null }, "refundable_credits" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Refundable credits balance of this customer\n", "minimum" : 0, "example" : null }, "excess_payments" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Total unused payments associated with the customer. These are automatically applied to new invoices subject to limits set at the site level which can be overridden for subscriptions via subscription.billing_override.

\n

Constraints

", "minimum" : 0, "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Determines whether the customer is e-invoiced. When set to true\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (billing_address.country\n). When set to false\n, the customer is not e-invoiced even if e-invoicing is enabled for their country.

\n

Tip:

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", "example" : null }, "einvoicing_method" : { "type" : "string", "deprecated" : false, "description" : "Determines whether to send e-invoice manually or automatic.\n\\* automatic -\n\nUse this value to send e-invoice every time an invoice or credit note is created.\n\\* manual -\n\nWhen manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API.\n\\* site_default -\n\nThe default value of the site which can be overridden at the customer level.\n", "enum" : [ "automatic", "manual", "site_default" ], "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features) .\n", "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates that this resource has been deleted when the value is true\n.

", "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "

Confirms that a customer is registered under GST. If set to true\nthen the Reverse Charge Mechanism\nis applicable. This field is applicable only when Australian GST is configured for your site.

", "example" : null }, "consolidated_invoicing" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether invoices raised on the same day for the customer are consolidated. When present, this value overrides the default configuration at the site-level. This attribute is applicable only when Consolidated Invoicing is enabled.

\n

Note:

Any invoices raised when a subscription activates from in_trial or future status, are not consolidated by default. Contact Support to enable consolidation for such invoices.

", "example" : null }, "customer_type" : { "type" : "string", "deprecated" : false, "description" : "**Note**\nApplicable only when the [Chargebee's AvaTax for Communications integration](https://www.chargebee.com/docs/avatax-for-communication.html) is enabled.\n\nIndicates the [Avalara customer type](https://developer.avalara.com/communications-integration/design-considerations/customer-type/)\n.\n\\* industrial -\n\nThe customer is an industrial business.\n\\* residential -\n\nThe customer is an individual user.\n\\* senior_citizen -\n\nThe customer is an individual that meets the jurisdiction requirements to be considered a senior citizen and qualifies for tax breaks.\n\\* business -\n\nThe customer represents a business.\n", "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null }, "business_customer_without_vat_number" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is a valid business without an EU/UK VAT number.\n", "example" : null }, "client_profile_id" : { "type" : "string", "deprecated" : false, "description" : "**Note**\nApplicable only when the [Chargebee's AvaTax for Communications integration](https://www.chargebee.com/docs/avatax-for-communication.html) is enabled.\n\nThe [Avalara client profile ID](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/client-profiles/)\nassigned to the customer.\n", "maxLength" : 50, "example" : null }, "use_default_hierarchy_settings" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Indicates whether the site-default settings are being used for controlling access to the customer's information.\nThe level of access is for data falling into two categories: - **Self-Serve Portal data:** subscriptions and invoices of the customer.\n\n* **Email Notifications:** subscription-, invoice- and payment-related notifications for the customer.\n", "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "

The standard used for specifying the entity_identifier_scheme.\nCurrently only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If there are additional entity identifiers for the customer not associated with the vat_number, they can be provided as the entity_identifiers[] array.

\n", "maxLength" : 50, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Billing address for a customer.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "referral_urls" : { "type" : "array", "deprecated" : false, "description" : "List of referral urls for the customer (if applicable)\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "external_customer_id" : { "type" : "string", "deprecated" : false, "description" : "External customer id in the referral system\n", "maxLength" : 100, "example" : null }, "referral_sharing_url" : { "type" : "string", "deprecated" : false, "description" : "Referral sharing url for the customer\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The referral url creation time\n", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The referral url updation time\n", "example" : null }, "referral_campaign_id" : { "type" : "string", "deprecated" : false, "description" : "Referral campaign id\n", "maxLength" : 50, "example" : null }, "referral_account_id" : { "type" : "string", "deprecated" : false, "description" : "Referral account id\n", "maxLength" : 50, "example" : null }, "referral_external_campaign_id" : { "type" : "string", "deprecated" : false, "description" : "Referral external campaign id\n", "maxLength" : 50, "example" : null }, "referral_system" : { "type" : "string", "deprecated" : false, "description" : "Url for the referral system account\n\\* referral_saasquatch -\n\nReferral Saasquatch\n\\* friendbuy -\n\nFriendbuy\n\\* referral_candy -\n\nReferral Candy\n", "enum" : [ "referral_candy", "referral_saasquatch", "friendbuy" ], "example" : null } }, "required" : [ "created_at", "referral_account_id", "referral_campaign_id", "referral_sharing_url", "referral_system", "updated_at" ], "example" : null }, "example" : null }, "contacts" : { "type" : "array", "deprecated" : false, "description" : "contacts\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for the contact.\n", "maxLength" : 150, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the contact.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the contact.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "Label/Tag provided for contact.\n", "maxLength" : 50, "example" : null }, "enabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Contact enabled / disabled\n", "example" : null }, "send_account_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Account Emails option is enabled for the contact.\n", "example" : null }, "send_billing_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Billing Emails option is enabled for the contact.\n", "example" : null } }, "required" : [ "email", "enabled", "id", "send_account_email", "send_billing_email" ], "example" : null }, "example" : null }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Primary Payment Source of the customer.\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "Type of payment source\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* go_pay -\n\nPayments made via GoPay\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* qpay -\n\nPayments made via Qpay.\n\\* pix -\n\nPayments made via Pix\n\\* pay_by_bank -\n\nPay By Bank\n\\* sofort -\n\nPayments made via Sofort.\n\\* twint -\n\nPayments made via Twint\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* giropay -\n\nPayments made via giropay.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* paypay -\n\nPayments made via PayPay\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* upi -\n\nUPI Payments.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* tamara -\n\nPayments made via Tamara.\n\\* payme -\n\nPayments made via PayMe\n\\* pay_to -\n\nPayments made via PayTo\n\\* pay_co -\n\nPayments made via PayCo\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* klarna -\n\nPayments made via Klarna.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* swish -\n\nPayments made via Swish\n\\* venmo -\n\nPayments made via Venmo\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* dana -\n\nPayments made via Dana.\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* gcash -\n\nPayments made via GCash.\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* trustly -\n\nTrustly\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "

Name of the gateway the payment method is associated with.

\n* ecentric -

Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.

\n* paypal_payflow_pro -

PayPal Payflow Pro is a payment gateway.

\n* sage_pay -

Sage Pay is a payment gateway.

\n* wepay -

WePay is a payment gateway.

\n* wirecard -

WireCard Account is a payment service provider.

\n* ezidebit -

Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.

\n

Ezidebit is in beta.

\n* moyasar -

Moyasar is a fully integrated online payment service that makes accepting payments simple and secure.

\n* migs -

MasterCard Internet Gateway Service payment gateway.

\n* ebanx -

EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.

\n\n* beanstream -

Bambora(formerly known as Beanstream) is a payment gateway.

\n* adyen -

Adyen is a payment gateway.

\n* payway -

Payway is a payment gateway that enables secure card and payment acceptance.

\n* 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.

\n* braintree -

Braintree is a payment gateway.

\n* nmi -

NMI is a payment gateway.

\n* chargebee_payments -

Chargebee Payments gateway

\n* bluepay -

BluePay is a payment gateway.

\n* paypal -

PayPal Commerce is a payment gateway.

\n* jp_morgan -

J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type.

\n* bank_of_america -

Bank of America is a payment gateway.

\n* paypal_pro -

PayPal Pro Account is a payment gateway.

\n* eway_rapid -

eWAY Rapid is a payment gateway.

\n* 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.

\n

This feature is a Private Beta Release. Request access to enable Nuvei for your test and live sites.

\n* windcave -

Windcave provides an end to end payment processing solution in ANZ and other leading global markets.

\n* dlocal -

Dlocal provides payment solutions for global commerce by accepting local payment methods.

\n* moneris_us -

Moneris USA is a payment gateway.

\n* exact -

Exact Payments is a payment gateway.

\n* paypal_express_checkout -

PayPal Express Checkout is a payment gateway.

\n* solidgate -

Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and is suitable for various types of businesses.

\n* tco -

2Checkout is a payment gateway.

\n* pay_com -

Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.

\n* chargebee -

Chargebee test gateway.

\n* stripe -

Stripe is a payment gateway.

\n* eway -

eWAY Account is a payment gateway.

\n* authorize_net -

Authorize.net is a payment gateway

\n* moneris -

Moneris is a payment gateway.

\n* worldpay -

WorldPay is a payment gateway

\n* pin -

Pin is a payment gateway

\n* gocardless -

GoCardless is a payment service provider.

\n* elavon -

Elavon Virtual Merchant is a payment solution.

\n* cybersource -

CyberSource is a payment gateway.

\n* deutsche_bank -

Deutsche Bank is the leading German bank with strong European roots and a global network.

\n* vantiv -

Vantiv is a payment gateway.

\n* amazon_payments -

Amazon Payments is a payment service provider.

\n* global_payments -

Global Payments is a payment service provider.

\n* first_data_global -

First Data Global Gateway Virtual Terminal Account

\n* paystack -

Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline.

\n

This feature is a Private Beta Release. Request access to enable Paystack for your test and live sites.

\n* orbital -

Chase Paymentech(Orbital) is a payment gateway.

\n* checkout_com -

Checkout.com is a payment gateway.

\n* quickbooks -

Intuit QuickBooks Payments gateway

\n* mollie -

Mollie is a payment gateway.

\n* bluesnap -

BlueSnap is a payment gateway.

\n* paymill -

PAYMILL is a payment gateway.

\n* twikey -

Twikey is a payment service provider that specializes in processing direct debit payments across the EU.

\n* ogone -

Ingenico ePayments (formerly known as Ogone) is a payment gateway.

\n* not_applicable -

Indicates that payment gateway is not applicable for this resource.

\n* hdfc -

HDFC Account is a payment gateway.

\n* balanced_payments -

Balanced is a payment gateway

\n* tempus -

Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with point-to-point encryption (P2PE) and tokenization.

\n* ingenico_direct -

Worldline Online Payments is a payment gateway.

\n* metrics_global -

Metrics global is a leading payment service provider providing unified payment services in the US.

", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account this payment method is stored with.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "valid", "deprecated" : false, "description" : "Current status of the payment source.\n\\* expired -\n\nA payment source that has expired\n\\* invalid -\n\nThe billing agreement cannot be used. It might become valid again either automatically or due to customer action.\n\\* valid -\n\nA payment source that is valid and active.\n\\* pending_verification -\n\nThe payment source needs to be verified\n\\* expiring -\n\nA payment source that is expiring (like card's status based on its expiry date).\n", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "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 payments this will be the identifier provided by the gateway/card vault for the specific payment method resource.\n**Note:**\nThis is not the one time temporary token provided by gateways like Stripe.\n", "maxLength" : 200, "example" : null } }, "required" : [ "gateway", "reference_id", "status", "type" ], "example" : null }, "balances" : { "type" : "array", "deprecated" : false, "description" : "The list of balances for this customer.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "promotional_credits" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Promotional credits balance of this customer.\n", "minimum" : 0, "example" : null }, "excess_payments" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

Total unused payments associated with the customer. These are automatically applied to new invoices subject to limits set at the site level which can be overridden for subscriptions via subscription.billing_override.

", "minimum" : 0, "example" : null }, "refundable_credits" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

Refundable credits balance of this customer. These are automatically applied to new invoices subject to limits set at the site level which can be overridden for subscriptions via subscription.billing_override.

", "minimum" : 0, "example" : null }, "unbilled_charges" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Total unbilled charges for this customer.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for balance.\n", "maxLength" : 3, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [business entity](/docs/api/business_entities)\nassociated with this balance.\n", "maxLength" : 50, "example" : null } }, "required" : [ "currency_code", "excess_payments", "promotional_credits", "refundable_credits", "unbilled_charges" ], "example" : null }, "example" : null }, "entity_identifiers" : { "type" : "array", "deprecated" : false, "description" : "

Each element of the entity_identifiers[]\narray identifies a specific customer entity with the e-invoicing system. If the customer has only one entity identifier whose value\nis the vat_number\n, then this array is not needed as the scheme\ncan be provided via entity_identifier_scheme.\nThis array holds any additional entity identifiers that the customer may have.

\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id for the entity_identifier\nin Chargebee. When not provided, it is autogenerated.

", "maxLength" : 40, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

The value of the entity_identifier.\nThis identifies the customer entity on the Peppol network. For example: 10101010-STO-10\n.

\n

Tip:

If 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[].

", "maxLength" : 50, "example" : null }, "scheme" : { "type" : "string", "deprecated" : false, "description" : "

The Peppol BIS scheme associated with the vat_number\nof the customer. This helps identify the specific type of customer entity. For example, DE:VAT\nis used for a German business entity while DE:LWID45\nis 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.\nSee list of possible values\n.

\n

Tip:

If 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[].

", "maxLength" : 50, "example" : null }, "standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "

The standard used for specifying the entity_identifier\nscheme.\nCurrently, only iso6523-actorid-upis\nis supported and is used by default when not provided.

\n

Tip:

If 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[].

", "maxLength" : 50, "example" : null } }, "required" : [ "id", "scheme" ], "example" : null }, "example" : null }, "tax_providers_fields" : { "type" : "array", "deprecated" : false, "description" : "This represents information related to custom [Tax Provider Fields](/docs/api/subscriptions).\nIt includes the provider name, field Id, and its corresponding field value. It is used to send custom Tax provider fields to any tax provider.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "provider_name" : { "type" : "string", "deprecated" : false, "description" : "Name of the tax vendor currently we support.\n", "maxLength" : 50, "example" : null }, "field_id" : { "type" : "string", "deprecated" : false, "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "maxLength" : 50, "example" : null }, "field_value" : { "type" : "string", "deprecated" : false, "description" : "Field value of the corresponding tax field.\n", "maxLength" : 50, "example" : null } }, "required" : [ "field_id", "field_value", "provider_name" ], "example" : null }, "example" : null }, "relationship" : { "type" : "object", "deprecated" : false, "description" : "The \\[account hierarchy\\](https://www.chargebee.com/docs/account-hierarchy.html) relationship that the customer is part of.\n", "properties" : { "parent_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the immediate parent of this customer under account hierarchy. If the customer is the root of the hierarchy, this attribute isn't returned.

", "maxLength" : 50, "example" : null }, "payment_owner_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer responsible for paying the invoices for this customer. This ID must match either this customer's ID or the invoice_owner_id\n.

", "maxLength" : 50, "example" : null }, "invoice_owner_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer who receives the invoice for charges incurred by the customer. This ID must match either this customer or one of its ancestors.

", "maxLength" : 50, "example" : null } }, "required" : [ "invoice_owner_id", "payment_owner_id" ], "example" : null }, "parent_account_access" : { "type" : "object", "deprecated" : false, "description" : "

When the customer is part of an account hierarchy, this attribute defines the level of access that the parent account has to the customer's information.\nNote:\nthe 'parent' is the customer whose id is payment_owner_id.\nHowever, if the payment_owner_id\nis the customer itself, then the parent is parent_id\n.

", "properties" : { "portal_edit_child_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Determines the parent's access to the child's subscriptions in the Self-Serve Portal.\n\\* no -\n\nThe parent can't view or edit the child's subscriptions.\n\\* view_only -\n\nThe parent can only view the child's subscriptions.\n\\* yes -\n\nThe parent can view and edit the child's subscriptions.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "portal_download_child_invoices" : { "type" : "string", "deprecated" : false, "description" : "Determines the parent's access to the child's invoices in the Self-Serve Portal.\n\\* no -\n\nThe parent can't view or download the child's invoices.\n\\* yes -\n\nThe parent can both view and download the child's invoices.\n\\* view_only -\n\nThe parent can view but not download the child's invoices.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether the parent receives email notifications for the child's subscriptions.\n", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether the parent receives email notifications for the child's invoices.\n", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether, the parent receives email notifications for payment-related activities on the child's invoices.\n", "example" : null } }, "required" : [ "send_invoice_emails", "send_payment_emails", "send_subscription_emails" ], "example" : null }, "child_account_access" : { "type" : "object", "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.\n", "properties" : { "portal_edit_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own subscriptions in the Self-Serve Portal.\n\\* yes -\n\nThe child account can view and edit its subscriptions.\n\\* view_only -\n\nThe child account can only view its subscriptions.\n", "enum" : [ "yes", "view_only" ], "example" : null }, "portal_download_invoices" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own invoices in the Self-Serve Portal.\n\\* view_only -\n\nThe child account can view but not download its invoices.\n\\* yes -\n\nThe child account can both view and download its invoices.\n\\* no -\n\nThe child account cannot view or download its own invoices.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether the child account receives email notifications for its subscriptions.\n", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether the child account receives email notifications for its invoices.\n", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether the child account receives email notifications for payment-related activities for its invoices.\n", "example" : null } }, "required" : [ "send_invoice_emails", "send_payment_emails", "send_subscription_emails" ], "example" : null } }, "required" : [ "allow_direct_debit", "auto_collection", "created_at", "deleted", "excess_payments", "id", "net_term_days", "promotional_credits", "refundable_credits", "unbilled_charges" ], "example" : null }, "CustomerBusinessEntityChangedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "business_entity_transfer" : { "$ref" : "#/components/schemas/BusinessEntityTransfer" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "business_entity_transfer", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CustomerChangedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CustomerCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CustomerDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "subscriptions" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/Subscription" }, "example" : null } }, "required" : [ "card", "customer", "subscriptions" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CustomerEntitlement" : { "type" : "object", "description" : "

The customer_entitlement resource can be viewed as a subset of the subscription_entitlement resource enhanced with the customer's ID. It is introduced to help retrieve all subscription entitlements for a specific customer.

", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [customer](/docs/api/customers)\nto which this entitlement belongs.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [subscription](/docs/api/subscriptions)\nto which this entitlement belongs.\n", "maxLength" : 50, "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [feature](/docs/api/features)\ntowards which this subscription entitlement has been granted.\n", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "The value denoting the effective entitlement level that the subscription has towards the feature.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

The display name for the entitlement level. The value is automatically generated based on feature.type:

\n", "maxLength" : 50, "example" : null }, "is_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

When true\n, indicates that the subscription_entitlement\nis enabled.

\n

See also:\nEnable or disable subscription entitlement.

", "example" : null } }, "required" : [ "customer_id", "is_enabled" ], "example" : null }, "CustomerEntitlementsUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "impacted_customer" : { "$ref" : "#/components/schemas/ImpactedCustomer" } }, "required" : [ "impacted_customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CustomerMovedInEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CustomerMovedOutEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "CustomerType" : { "type" : "string", "deprecated" : false, "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null }, "DedupeOption" : { "type" : "string", "deprecated" : true, "enum" : [ "skip", "update_existing" ], "example" : null }, "DifferentialPrice" : { "type" : "object", "description" : "Differential pricing helps implement a pricing strategy for addons and charges based on the plans they're purchased with. A differential price a specific price for an addon- or charge-[item price](/docs/api/item_prices) when purchased along with a particular plan.\n\nDifferential pricing for addons\n-------------------------------\n\nConsider an addon called 24x7 Customer Support provided with a cloud storage service. You can configure differential prices for each of the addon-item prices based on the plan they are purchased with, as follows: \n\n|---|-----------------------------------------------------|-----------------------------------------------|-----------------------------------------------------|\n| | **Addon item price** | **Price when applied to *Standard*** **Plan** | **Price when applied to** ***Enterprise*** **Plan** |\n| 1 | 24x7 Customer Support, USD, Monthly, Flat fee, $100 | $90 | $150 |\n| 2 | 24x7 Customer Support, USD, Yearly, Flat fee, $1000 | $900 | $1500 |\n\nDifferential pricing for charges\n--------------------------------\n\nConsider a charge, called Setup fee, for installing and configuring a cloud-based project management platform. There are two modes in which you can set up differential pricing for a charge:\n\n#### Mode A: One charge differential price per plan-item\n\nThis mode is used to specify one differential price for the charge-item price per [plan-item](/docs/api/items) it is applied to. \n\n|-------------------------------|---------------------------------------------------|-----------------------------------------------------|\n| **Charge-item price** | **Price when applied to** ***Standard*** **plan** | **Price when applied to** ***Enterprise*** **plan** |\n| Setup fee, USD, Flat fee $500 | $400 | $700 |\n\n#### Mode B: Multiple charge differential prices per plan item\n\nThis mode is used to specify multiple differential prices for the charge per plan-item, based on the plan period. \n\n|-------------------------------|-------------------------------------------------------------|-----------------------------------------------------------|\n| **Charge-item price** | **Price when applied to** ***Standard*** **plan, 6 months** | **Price when applied to** ***Standard*** **plan, yearly** |\n| Setup fee, USD, Flat fee $500 | $400 | $300 |\n\nIn the above example, even if the \"6 month\" or \"yearly\" plan-item prices do not exist, the differential prices for the charge can still be created. They take effect whenever the plan-item prices are eventually created and used in subscriptions.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable ID for the differential price. It is auto-generated when the differential price is created.\n", "maxLength" : 100, "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The ID of the item price (addon\nor charge\n) whose price should change according to the plan-item it is applied to.

", "maxLength" : 100, "example" : null }, "parent_item_id" : { "type" : "string", "deprecated" : false, "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*\nor *Enterprise*\nplans-items mentioned in the [examples above](/docs/api/differential_prices)\n.\n", "maxLength" : 100, "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The differential price. If the pricing model of the item_price_id\nis tiered\n, volume\n, or stairstep\n, pass tiers\ninstead of this.

", "minimum" : 0, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The price of the item when the pricing_model is flat_fee.\nWhen the pricing model is per_unit\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The item family state.\n\\* active -\n\nNew items can be created with the item family.\n\\* deleted -\n\nNo items allowed for the item family.\n", "enum" : [ "active", "deleted" ], "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when this differential price was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which this differential price was created.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which this differential price was last modified.\n", "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the plan\n", "maxLength" : 3, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the\n[business entity](/docs/api/getting-started)\nof this subscription. This is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.\n", "maxLength" : 50, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the differential price has been deleted or not.\n", "example" : null }, "tiers" : { "type" : "array", "deprecated" : false, "description" : "

List of quantity-based pricing tiers for the differential price. Applicable only for tiered\n, volume\n, and stairstep\npricing_model\ns. The tiers are exactly the same as those set for the item price. Only the price\nattribute for the various tiers can be overridden for the differential price.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 1, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "price" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume\n; the total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency\n.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "price", "starting_unit" ], "example" : null }, "example" : null }, "parent_periods" : { "type" : "array", "deprecated" : false, "description" : "

When item_price_id\nis a charge-item, you can specify the plan period for which the price applies. Although an array, currently you can specify only one period. In other words, only index 0\nis allowed. Create another differential price to specify another period. Is permitted only when item_price_id\nis a charge-item.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period\n.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "period" : { "type" : "array", "deprecated" : false, "description" : "

The billing period of the plan in period_unit\ns. For example, a 6 month plan has period\nas 6 and period_unit\nas month\n.

", "items" : { "example" : null }, "example" : null } }, "required" : [ "period_unit" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "currency_code", "deleted", "id", "item_price_id", "modified_at", "parent_item_id" ], "example" : null }, "DifferentialPriceCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "differential_price" : { "$ref" : "#/components/schemas/DifferentialPrice" } }, "required" : [ "differential_price" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "DifferentialPriceDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "differential_price" : { "$ref" : "#/components/schemas/DifferentialPrice" } }, "required" : [ "differential_price" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "DifferentialPriceUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "differential_price" : { "$ref" : "#/components/schemas/DifferentialPrice" } }, "required" : [ "differential_price" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "DirectDebitScheme" : { "type" : "string", "deprecated" : false, "enum" : [ "ach", "bacs", "sepa_core", "autogiro", "becs", "becs_nz", "pad", "not_applicable" ], "example" : null }, "Discount" : { "type" : "object", "description" : "

A discount, just like coupons, represents a deduction from the amounts in an invoice. While coupons are typically used by your customers, discounts can be directly applied to subscriptions by your sales team while negotiating new deals or upgrades. If the negotiations are on the price itself, the price override feature helps adjust the price further.

Although a discount appears as a deduction on an invoice, it is applied to a subscription while creating or updating the subscription. Every discount in Chargebee is attached to only one subscription.

Note:

Adding a discount

Subscriptions

A discount can be added to a subscription by calling either Create subscription or Update subscription. Once added, the discount is applied to all subsequent invoices if apply_on is set to invoice_amount. When apply_on = specific_item_price, the discount is applied (as a discount.line_item_discount) in each invoice of the subscription that contains the specified item.

Invoices

A discount can be added to an invoice using Create invoice for items and one-time charges using the discounts parameter.

Quotes

A discount can be added to a quote using the following operations:

Estimates

A discount can be added to an estimate using the following endpoints:

Removing a discount

Subscriptions

A discount can be removed by calling Update subscription with the relevant discounts[operation_type][] set to remove. Also, discounts that have duration_type as one_time or limited_period are removed automatically upon expiry.

Quotes

A discount can be removed from a quote using the following operations:

Estimates

A discount can be removed from an estimate using the following operation:

Listing discounts

A discount is associated with exactly one subscription. You can fetch all the discounts currently attached to a subscription by calling the List discounts for a subscription API or by passing include_discounts as true while creating, importing, updating or retrieving a subscription.

Order of application of coupons and discounts

When both coupons and discounts are applied simultaneously to a subscription or one-time invoice, they're applied in the following order:

SummaryDescription
1Line-level, fixed amount couponscoupon with apply_on = each_specified_item and discount_type = flat
2Line-level, fixed amount discountsdiscount with apply_on = specific_item_price and type = fixed_amount
3Line-level, percentage couponscoupon with apply_on = each_specified_item and discount_type = percentage
4Line-level, percentage discountsdiscount with apply_on = specific_item_price and type = percentage
5Line-level, offer quantity couponscoupon with apply_on = each_specified_item and discount_type = offer_quantity
6Line-level, offer quantity discountsdiscount with apply_on = specific_item_price and discount_type = offer_quantity
7Invoice-level, fixed amount couponscoupon with apply_on = invoice_amount and discount_type = flat
8Invoice-level, fixed amount discountsdiscount with apply_on = invoice_amount and type = fixed_amount
9Invoice-level, percentage couponscoupon with apply_on = invoice_amount and discount_type = percentage
10Invoice-level, percentage discountsdiscount with apply_on = invoice_amount and type = percentage

For example, consider the following scenario:

A subscription is created with:

The above coupons and discount are applied in the following order:

Discount or coupon appliedSubtotal at each step
1Initial subtotal (plan price + addon price)$200 + $20 = $220
21% off coupon on the addon$200 + $(20 - 0.02) = $200 + $19.98 = $219.98
3Flat $2 coupon on the invoice$219.98 - $2 = $217.98
4Flat $5 invoice discount$217.98 - $5 = $212.98
", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique id for the discount. It is always auto-generated.\n", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the discount as it should appear on customer-facing pages and documents such as invoices\nand hosted pages.\nThis is auto-generated based on the type\n, amount\n, and currency_code\nof the discount. For example, it can be 10% off\nor 10$ off\n.

", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "

The type of discount.\nPossible value are:

\n* percentage -

The specified percentage will be given as discount.

\n* fixed_amount -

The specified amount will be given as discount.

\n* offer_quantity -

A specified number of units of the item price are offered for free. The number of free units is specified in quantity.\nThe offer_quantity\noption is valid only when apply_on\nis set to each_specified_item\nand the pricing_model\nof the item price is per_unit\n.

", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "

The percentage of the original amount that should be deducted from it. Only applicable when discount.type\nis percentage.

\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The value of the discount. The format of this value\ndepends on the kind of currency. This is only applicable when discount.type\nis fixed_amount.

\n", "minimum" : 0, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the number of free units provided for the item, without affecting the total quantity sold. This parameter is applicable only when discount.type\nis offer_quantity.

\n", "minimum" : 1, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The currency code (ISO 4217 format\n) of the discount. This is only applicable when discount.type\nis fixed_amount\n.

", "maxLength" : 3, "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* year -

A period of 1 calendar year.

\n* month -

A period of 1 calendar month.

\n* week -

A period of 7 days.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this discount is created.\n", "example" : null }, "apply_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Specifies till when the limited period discount is applicable. This attribute will be sent in the response only for limited_period\nduration type discount.

", "example" : null }, "applied_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Specifies the number of times the discount has been applied.\n", "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

", "maxLength" : 100, "example" : null }, "index" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The index number of the subscription to which the item price is added. Provide a unique number between 0\nand 4\n(inclusive) for each subscription that is to be created.

", "minimum" : 0, "example" : null } }, "required" : [ "apply_on", "coupon_id", "created_at", "duration_type", "id", "included_in_mrr", "index", "type" ], "example" : null }, "DiscountType" : { "type" : "string", "deprecated" : false, "enum" : [ "fixed_amount", "percentage", "price" ], "example" : null }, "DispositionType" : { "type" : "string", "default" : "attachment", "deprecated" : false, "enum" : [ "attachment", "inline" ], "example" : null }, "Download" : { "type" : "object", "description" : "

Requesting to download a file through this API will return the download_url attribute as the response. This attribute will contain a URL that will allow the requested content to be downloaded.

", "properties" : { "download_url" : { "type" : "string", "deprecated" : false, "description" : "The URL at which the file is available for download.\n", "maxLength" : 3500, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time until which the download_url\nis valid.

", "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "description" : "The [media type](https://en.wikipedia.org/wiki/Media_type)\nof the file.\n", "maxLength" : 100, "example" : null } }, "required" : [ "download_url", "valid_till" ], "example" : null }, "DunningType" : { "type" : "string", "default" : "auto_collect", "deprecated" : false, "enum" : [ "auto_collect", "offline", "direct_debit", "real_time_payments" ], "example" : null }, "DunningUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "DurationType" : { "type" : "string", "default" : "forever", "deprecated" : false, "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "EInvoicingCountry" : { "type" : "object", "properties" : { "country" : { "type" : "string", "deprecated" : false, "maxLength" : 30, "example" : null }, "external_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "status" : { "type" : "string", "default" : "draft", "deprecated" : false, "enum" : [ "draft", "active" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "country", "created_at", "modified_at", "status" ], "example" : null }, "EInvoicingCountryRule" : { "type" : "object", "properties" : { "model" : { "type" : "string", "deprecated" : false, "enum" : [ "peppol", "zugferd", "einvoice", "clearance", "reporting", "ctc", "nemhandel", "face", "verifactu" ], "example" : null }, "transaction_type" : { "type" : "string", "deprecated" : false, "enum" : [ "b2b", "b2c", "b2g" ], "example" : null }, "status" : { "type" : "string", "default" : "draft", "deprecated" : false, "enum" : [ "draft", "active" ], "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "step" : { "type" : "string", "deprecated" : false, "enum" : [ "routing_config", "field_mapping", "completed" ], "example" : null }, "routing_config" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "field_mapping" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "modified_at", "status" ], "example" : null }, "EcheckType" : { "type" : "string", "deprecated" : false, "enum" : [ "web", "ppd", "ccd" ], "example" : null }, "EffectiveEntitlement" : { "type" : "object", "properties" : { }, "example" : null }, "EffectiveOnEvent" : { "type" : "string", "deprecated" : false, "enum" : [ "subscription_renewal" ], "example" : null }, "Einvoice" : { "type" : "object", "description" : "Represents the e-invoice record associated with an invoice, including its processing status, reference number (such as one assigned by the IRP), and related status messages.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id for the e-invoice. This is auto-generated by Chargebee.

", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier returned by the connected e-invoicing provider for this submission (for example, a document submission id). Chargebee uses this value when communicating with the provider to retrieve submission status and related artifacts.\n", "maxLength" : 50, "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "This attribute is used to populate the unique reference number assigned to an invoice on the Invoice Registration Portal (IRP) network. It is essential for identifying and tracking invoices that are processed through the IRP network.\n\nIn the future, this field may be used to store similar reference numbers for other networks.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of processing the e-invoice. To obtain detailed information about the current status, see message.

\n* failed -

The e-invoice was sent and there was an error due to which it was not delivered.

\n* in_progress -

The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.

\n* success -

The e-invoice has been successfully delivered to the customer.

\n* scheduled -

Sending the e-invoice to the customer has been scheduled.

\n* registered -

The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.

\n* 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.

", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "message" : { "type" : "string", "deprecated" : false, "description" : "

Detailed information about the status of the e-invoice. When status is skipped or failed, this contains the reason or error details. The following are some valid examples:

\n", "maxLength" : 3000, "example" : null }, "provider_references" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null } }, "required" : [ "id", "status" ], "example" : null }, "EinvoicingMethod" : { "type" : "string", "deprecated" : false, "enum" : [ "automatic", "manual", "site_default" ], "example" : null }, "EndScheduleOn" : { "type" : "string", "deprecated" : false, "enum" : [ "after_number_of_intervals", "specific_date", "subscription_end" ], "example" : null }, "Entitlement" : { "type" : "object", "description" : "

The entitlement resource establishes a connection between a feature\nand an item\nor an item_price\nin Chargebee Billing. By defining this relationship, it specifies the scope of access or rights the item or item price has in relation to that particular feature.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the entitlement. This is auto-generated.\n", "maxLength" : 100, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the entity being granted entitlement to a specific feature.

", "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of the entity that holds this entitlement.

\n* plan -

Indicates that the entity is an item with type set to plan.

\n* addon -

Indicates that the entity is an item with type set to addon.

\n* addon_price -

Indicates that the entity is an item_price associated with an item with type set to addon.

\n* charge -

Indicates that the entity is an item with type set to charge.

\n* plan_price -

Indicates that the entity is an item_price associated with an item of type plan.

", "enum" : [ "plan", "addon", "charge", "plan_price", "addon_price" ], "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the feature to which the entity gains entitlement.

", "maxLength" : 50, "example" : null }, "feature_name" : { "type" : "string", "deprecated" : false, "description" : "

The name\nof the feature associated with this entitlement.

", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

The level of entitlement that the entity has towards the feature. The possible values depend on the value of feature.type\n:

\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

The display name for the entitlement level. The value is automatically generated based on feature.type:

\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null }, "EntitlementOverride" : { "type" : "object", "description" : "

subscriptions inherit entitlements from items and/or item prices that are in them. Even so, there are many reasons why you may want to override the inherited entitlements on a subscription:

This API helps you implement each of the above use cases, offering a method to override the entitlements for a subscription at the subscription, item price, or charge-item level.

entitlement_override expiry

If expires_at has been set, then the entitlement_override object is no longer returned after expires_at has passed. The expiration of an entitlement_override does not trigger any event immediately. However, after expiry, the entitlement_override record gets deleted within 12 hours. This deletion triggers the entitlement_overrides_auto_removed event which can be considered as a notification, albeit delayed, for one or more entitlement_overrides having expired.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier for the entitlement override. This is always auto-generated.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the subscription to which this entitlement override belongs.

", "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "* When omitted, the entitlement override applies at the subscription level. See [subscription-level entitlement overrides](/docs/api/subscription_entitlements/subscription-entitlement-object#subscription-level-override).\n* When provided, this is the ID of the entity whose contribution to the subscription entitlement is overridden. If the entity is not yet part of the subscription, the override takes effect when the entity is added. See [entity-level entitlement overrides](/docs/api/subscription_entitlements/subscription-entitlement-object#entity-level-overrides).\n", "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "The type of the entity at whose level the entitlement override is being set for the subscription.\n", "maxLength" : 50, "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the feature for which the entitlement override is being set.

", "maxLength" : 50, "example" : null }, "feature_name" : { "type" : "string", "deprecated" : false, "description" : "

The name\nof the feature\ntowards which this entitlement override has been granted.

", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

The display name for the entitlement level. The default values are auto-generated based on feature.type as follows:

\n", "maxLength" : 50, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The expiry date for the entitlement_override. The entitlement_override object is no longer returned after this date has passed.

\n

Constraints

\nApplicable only for subscription-level entitlement overrides. i.e. Not applicable when entity_id and entity_type are set.

", "example" : null }, "effective_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The starting date and time for the entitlement override. It indicates when the override becomes effective.

\n

Constraints

\nApplicable only for subscription-level entitlement overrides. i.e. Not applicable when entity_id and entity_type are set.

", "example" : null }, "is_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the feature availability.\n", "example" : null } }, "required" : [ "id", "is_enabled" ], "example" : null }, "EntitlementOverrideType" : { "type" : "string", "deprecated" : true, "enum" : [ "feature_entitlement", "credit_unit_grant" ], "example" : null }, "EntitlementOverridesAutoRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" }, "impacted_item" : { "$ref" : "#/components/schemas/ImpactedItem" }, "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" } }, "required" : [ "feature", "impacted_item", "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "EntitlementOverridesRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" } }, "required" : [ "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "EntitlementOverridesUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" } }, "required" : [ "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "EntitlementSetting" : { "type" : "object", "description" : "", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "", "maxLength" : 500, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "", "maxLength" : 500, "example" : null } }, "example" : null }, "EntitlementVersion" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan", "addon", "charge", "plan_price", "addon_price" ], "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "feature_name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "change_reason" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null } }, "required" : [ "id" ], "example" : null }, "EntityCode" : { "type" : "string", "deprecated" : false, "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "EntityType" : { "type" : "string", "deprecated" : false, "enum" : [ "customer", "subscription", "coupon", "plan_item_price", "addon_item_price", "charge_item_price", "plan_price", "addon_price", "charge_price", "invoice", "quote", "credit_note", "transaction", "plan", "addon", "order", "item_family", "item", "item_price", "plan_item", "addon_item", "charge_item", "differential_price", "attached_item", "feature", "subscription_entitlement", "item_entitlement", "business_entity", "price_variant", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_transaction", "recorded_purchase", "omnichannel_subscription_item_scheduled_change", "sales_order", "omnichannel_one_time_order", "omnichannel_one_time_order_item", "usage_file", "business_rule", "ruleset", "alert_status", "omnichannel_subscription_item_metric" ], "example" : null }, "Estimate" : { "type" : "object", "description" : "During the process of signing up customers to subscriptions, use the Estimates API to evaluate the details of the purchase before actually signing them up. The details returned by the API include the invoice amounts, next billing date and unbilled charges.\n\nFor example, consider that you are creating a new subscription or update an existing one. Use the Estimates API before that to deduce the details such as the amount the customer would be charged, the state the subscription would be in after creation or updation, and so on. \nIf you have configured the [Avalara integration](https://www.chargebee.com/docs/2.0/avalara.html), Chargebee retrieves the tax amount from Avalara for the invoice. This counts against your Avalara API limits.\n", "properties" : { "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which this estimate got generated\n", "example" : null }, "subscription_estimate" : { "type" : "object", "deprecated" : false, "description" : "Represents the subscription details when the 'estimate' operations are invoked.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the subscription\n", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the subscription.\n", "maxLength" : 3, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The status of the subscription.\n\\* in_trial -\n\nThe subscription is in trial.\n\\* paused -\n\nThe subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html).\nThe subscription will not renew while in this state.\n\\* transferred -\n\nThe subscription has been transferred to another business entity within the organization.\n\\* cancelled -\n\nThe subscription has been canceled and is no longer in service.\n\\* non_renewing -\n\nThe subscription will be canceled at the end of the current term.\n\\* future -\n\nThe subscription is scheduled to start at a future date.\n\\* active -\n\nThe subscription is active and will be charged for automatically based on the items in it.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "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)\nhas 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.\n\\* site_default -\n\nThis is the default value. The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n\\* activate_subscription -\n\nThe subscription activates and charges are raised for non-metered items.\n\\* cancel_subscription -\n\nThe subscription cancels.\n\\* plan_default -\n\nThe action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "next_billing_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date on which the next billing happens. This will be null for non-renewing and cancelled subscriptions.\n", "example" : null }, "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which subscription will be paused. Applicable only to paused or scheduled pause subscriptions\n", "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which subscription will be resumed. Applicable only to paused or scheduled pause subscriptions\n", "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Represents the shipping address when the 'estimate' operations are invoked.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* invalid -\n\nAddress is invalid.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* valid -\n\nAddress was validated successfully.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Represents the contract terms when the 'estimate' operations are invoked.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id that uniquely identifies the contract term in the site.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of contract\n\\* terminated -\n\nThe contract term was terminated ahead of completion.\n\\* cancelled -\n\nThe contract term was ended because: - a change in the subscription caused a [subscription term reset](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#force_term_reset).\n\n* the subscription was cancelled due to non-payment.\n\n\\* active -\n\nAn actively running contract term.\n\\* completed -\n\nThe contract term has run its full duration.\n", "enum" : [ "active", "completed", "cancelled", "terminated" ], "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the contract term\n", "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* renew - \n* evergreen -

Contract term completes and the subscription renews.

\n* 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.

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The sum of the totals\nof all the invoices raised as part of the contract term. For active\ncontract terms, this is a predicted value. The value depends on the type of currency.\nIf the subscription was imported\nwith the contract term, then this value includes the value passed for total_amount_raised\n.

", "minimum" : 0, "example" : null }, "total_contract_value_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "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\nis included in the calculation of the total contract value before tax. It's important to note that this value excludes any applicable taxes.

", "minimum" : 0, "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the contract term was created.\n", "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The [Id](/docs/api/subscriptions/subscription-object#id)\nof the subscription that this contract term is for.\n", "maxLength" : 50, "example" : null }, "remaining_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles remaining after the current one for the contract term. This attribute is only returned for active\ncontract terms.

", "minimum" : 0, "example" : null } }, "required" : [ "action_at_term_end", "billing_cycle", "contract_end", "contract_start", "created_at", "id", "status", "subscription_id", "total_contract_value", "total_contract_value_before_tax" ], "example" : null } }, "required" : [ "currency_code" ], "example" : null }, "subscription_estimates" : { "type" : "array", "deprecated" : false, "description" : "Is a list of estimated subscriptions i.e., an array of *subscription_estimate*\nobjects. It is generated when 'Create an estimate for purchase' operation is invoked\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the subscription\n", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the subscription.\n", "maxLength" : 3, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The status of the subscription.\n\\* future -\n\nThe subscription is scheduled to start at a future date.\n\\* transferred -\n\nThe subscription has been transferred to another business entity within the organization.\n\\* in_trial -\n\nThe subscription is in trial.\n\\* active -\n\nThe subscription is active and will be charged for automatically based on the items in it.\n\\* non_renewing -\n\nThe subscription will be canceled at the end of the current term.\n\\* cancelled -\n\nThe subscription has been canceled and is no longer in service.\n\\* paused -\n\nThe subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html).\nThe subscription will not renew while in this state.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "

Applicable only when End-of-trial Action\nhas 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.

\n* site_default -

The action configured for the site\nat the time when the trial ends, takes effect. This is the default value when trial_end_action\nis not\ndefined for the plan.

\n* plan_default -

The action configured for the site\nat the time when the trial ends, takes effect. This is the default value when trial_end_action\nis defined for the plan.

\n* cancel_subscription -

The subscription cancels.

\n* activate_subscription -

The subscription activates and charges are raised for non-metered items.

", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "next_billing_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date on which the next billing happens. This will be null for non-renewing and cancelled subscriptions.\n", "example" : null }, "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which subscription will be paused. Applicable only to paused or scheduled pause subscriptions\n", "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which subscription will be resumed. Applicable only to paused or scheduled pause subscriptions\n", "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Represents the shipping address when the 'estimate' operations are invoked.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* invalid -\n\nAddress is invalid.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Represents the contract terms when the 'estimate' operations are invoked.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id that uniquely identifies the contract term in the site.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of contract\n\\* active -\n\nAn actively running contract term.\n\\* completed -\n\nThe contract term has run its full duration.\n\\* cancelled -\n\nThe contract term was ended because: - a change in the subscription caused a [subscription term reset](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#force_term_reset).\n\n* the subscription was cancelled due to non-payment.\n\n\\* terminated -\n\nThe contract term was terminated ahead of completion.\n", "enum" : [ "active", "completed", "cancelled", "terminated" ], "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the contract term\n", "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* cancel -

Contract term completes and subscription is canceled.

\n* 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.

\n\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - ", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The sum of the totals\nof all the invoices raised as part of the contract term. For active\ncontract terms, this is a predicted value. The value depends on the type of currency.\nIf the subscription was imported\nwith the contract term, then this value includes the value passed for total_amount_raised\n.

", "minimum" : 0, "example" : null }, "total_contract_value_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "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\nis included in the calculation of the total contract value before tax. It's important to note that this value excludes any applicable taxes.

", "minimum" : 0, "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the contract term was created.\n", "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The [Id](/docs/api/subscriptions/subscription-object#id)\nof the subscription that this contract term is for.\n", "maxLength" : 50, "example" : null }, "remaining_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles remaining after the current one for the contract term. This attribute is only returned for active\ncontract terms.

", "minimum" : 0, "example" : null } }, "required" : [ "action_at_term_end", "billing_cycle", "contract_end", "contract_start", "created_at", "id", "status", "subscription_id", "total_contract_value", "total_contract_value_before_tax" ], "example" : null } }, "required" : [ "currency_code" ], "example" : null }, "example" : null }, "invoice_estimate" : { "type" : "object", "deprecated" : false, "description" : "Represents the preview of the invoice generated immediately when the 'estimate' operations are invoked.\n", "properties" : { "recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Whether or not the estimate for the invoice is recurring. Will be 'true' or 'false' for subscription related estimates.\n", "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of this invoice.\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the invoice.\n", "maxLength" : 3, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Invoice sub-total in cents.\n", "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Invoice total in cents.\n", "minimum" : 0, "example" : null }, "credits_applied" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "credits applied to this invoice in cents.\n", "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Existing outstanding payments if any, applied to this invoice in cents.\n", "minimum" : 0, "example" : null }, "amount_due" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Invoice amount due in cents\n", "minimum" : 0, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "

The details of the line items in this invoice estimate.

\n

Note

Line items that meet both the following conditions are not returned:

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this line item belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this line item.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this line item.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the line item.\n", "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "

Quantity of the recurring item\nwhich is represented by this line item. For metered\nline items, this value is updated from usages\nonce when the invoice is generated as pending\nand finally when the invoice is closed\n.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this line item. Typically equals to unit amount x quantity\n", "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models)\nfor this item price.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether this line item is taxed or not\n", "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The tax amount charged for this item\n", "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "Rate of tax used to calculate tax for this lineitem\n", "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this line\n", "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Line Item-level discounts for this line.\n", "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "Specifies whether this line item belongs to a [metered item](/docs/api/items#metered).\n", "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the line item is percentage-based.\n", "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Invoice Reference Line Item ID\n", "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this line item.\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this item.\n", "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason due to which the line item price/amount is exempted from tax.

\n* zero_value_item -

If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.

\n* tax_not_configured_external_provider -

If the tax is not configured for the country in 3rd party tax provider.

\n* reverse_charge -

If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only

\n* region_non_taxable -

If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction

\n* tax_not_configured -

If tax is not enabled for the site

\n* high_value_physical_goods -

If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied

\n* product_exempt -

If the Plan or Addon is marked as Tax exempt

\n* zero_rated -

If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item

\n* export -

You are not registered for tax in the customer's region. This is also the reason code when both billing_address\nand shipping_address\nhave not been provided for the customer and subscription respectively

\n* customer_exempt -

If the Customer is marked as Tax exempt

", "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this line item belongs to\n", "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for this line item\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discount(s) applied for each line item of this invoice.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique id of the line item that this deduction is for.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice. The entity_id\nis null\nin this case.

\n* item_level_coupon -

The deduction is due to a coupon applied to a line item of the invoice. The coupon id\nis available as entity_id\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id\nis available as entity_id\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on line items\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period end of the tax rate for the line item.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period start of the tax rate for the line item.\n", "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Indicates the prorated line item amount in cents.\n", "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount\n", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* city -\n\nThe tax jurisdiction is a city\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* state -\n\nThe tax jurisdiction is a state\n\\* special -\n\nSpecial tax jurisdiction.\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* county -\n\nThe tax jurisdiction is a county\n\\* country -\n\nThe tax jurisdiction is a country\n\\* other -\n\nJurisdictions other than the ones listed above.\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "line_item_credits" : { "type" : "array", "deprecated" : false, "description" : "A list of store credits applied to line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the credit note from which the credit is applied.\n", "maxLength" : 50, "example" : null }, "applied_amount" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The credit amount is applied to the line item.\n", "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the line item to which this credit is applied.\n", "maxLength" : 40, "example" : null } }, "required" : [ "applied_amount", "cn_id" ], "example" : null }, "example" : null }, "line_item_addresses" : { "type" : "array", "deprecated" : false, "description" : "The list of addresses used for tax calculation on line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Line item reference\n", "maxLength" : 40, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Name of the company\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "Name of the city\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address of the customer, specified as an [ISO 3166 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html).\nEntering an invalid code will return an error. \nIf [EU VAT](https://www.chargebee.com/docs/eu-vat.html) (2021 or later) or [Brexit configuration](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) is enabled, 'United Kingdom-Northern Ireland' is a valid option.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discounts applied to this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this deduction.\n", "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id of the line item that this deduction is for. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of discount that is applied to the line item. Relevant only when discounts[entity_type]\nis one of item_level_discount\n, item_level_coupon\n, document_level_discount\n, or document_level_coupon

\n* fixed_amount -

when amount is applied as discount

\n* percentage -

when percentage is applied as discount

", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "description" : "

The coupon code\n, if applicable, used to provide the discount. The coupon.id\nis available in entity_id\n.

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied to this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied. E.g. GST.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the tax item.\n", "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.\nIf there is no round-off amount\n, it will display 0\n.

", "minimum" : 0, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this invoice belongs to\n", "maxLength" : 100, "example" : null } }, "required" : [ "currency_code", "price_type", "recurring", "sub_total" ], "example" : null }, "invoice_estimates" : { "type" : "array", "deprecated" : false, "description" : "Is a list of estimated invoices i.e., an array of *invoice_estimate*\nobjects. It is generated when 'Create an estimate for unbilled charges' operation is invoked\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Whether or not the estimate for the invoice is recurring. Will be 'true' or 'false' for subscription related estimates.\n", "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of this invoice.\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the invoice.\n", "maxLength" : 3, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Invoice sub-total in cents.\n", "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Invoice total in cents.\n", "minimum" : 0, "example" : null }, "credits_applied" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "credits applied to this invoice in cents.\n", "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Existing outstanding payments if any, applied to this invoice in cents.\n", "minimum" : 0, "example" : null }, "amount_due" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Invoice amount due in cents\n", "minimum" : 0, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "

The details of the line items in this invoice estimate.

\n

Note

Line items that meet both the following conditions are not returned:

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this line item belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this line item.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this line item.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the line item.\n", "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "

Quantity of the recurring item\nwhich is represented by this line item. For metered\nline items, this value is updated from usages\nonce when the invoice is generated as pending\nand finally when the invoice is closed\n.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this line item. Typically equals to unit amount x quantity\n", "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models)\nfor this item price.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether this line item is taxed or not\n", "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The tax amount charged for this item\n", "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "Rate of tax used to calculate tax for this lineitem\n", "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this line\n", "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Line Item-level discounts for this line.\n", "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the line item is for a metered item. If true, the item is metered; otherwise, it is non-metered.

", "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the line item is percentage-based.\n", "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Invoice Reference Line Item ID\n", "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this line item.\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this item.\n", "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason due to which the line item price/amount is exempted from tax.

\n* export -

You are not registered for tax in the customer's region. This is also the reason code when both billing_address\nand shipping_address\nhave not been provided for the customer and subscription respectively

\n* customer_exempt -

If the Customer is marked as Tax exempt

\n* high_value_physical_goods -

If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied

\n* zero_rated -

If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item

\n* tax_not_configured -

If tax is not enabled for the site

\n* tax_not_configured_external_provider -

If the tax is not configured for the country in 3rd party tax provider.

\n* region_non_taxable -

If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction

\n* reverse_charge -

If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only

\n* product_exempt -

If the Plan or Addon is marked as Tax exempt

\n* zero_value_item -

If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.

", "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this line item belongs to\n", "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for this line item\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discount(s) applied for each line item of this invoice.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique id of the line item that this deduction is for.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice. The entity_id\nis null\nin this case.

\n* item_level_coupon -

The deduction is due to a coupon applied to a line item of the invoice. The coupon id\nis available as entity_id\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id\nis available as entity_id\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on line items\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period end of the tax rate for the line item.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period start of the tax rate for the line item.\n", "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Indicates the prorated line item amount in cents.\n", "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount\n", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* country -\n\nThe tax jurisdiction is a country\n\\* other -\n\nJurisdictions other than the ones listed above.\n\\* special -\n\nSpecial tax jurisdiction.\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* city -\n\nThe tax jurisdiction is a city\n\\* county -\n\nThe tax jurisdiction is a county\n\\* state -\n\nThe tax jurisdiction is a state\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "line_item_credits" : { "type" : "array", "deprecated" : false, "description" : "A list of store credits applied to line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the credit note from which the credit is applied.\n", "maxLength" : 50, "example" : null }, "applied_amount" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The credit amount is applied to the line item.\n", "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the line item to which this credit is applied.\n", "maxLength" : 40, "example" : null } }, "required" : [ "applied_amount", "cn_id" ], "example" : null }, "example" : null }, "line_item_addresses" : { "type" : "array", "deprecated" : false, "description" : "The list of addresses used for tax calculation on line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Line item reference\n", "maxLength" : 40, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Name of the company\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "Name of the city\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address of the customer, specified as an [ISO 3166 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html).\nEntering an invalid code will return an error. \nIf [EU VAT](https://www.chargebee.com/docs/eu-vat.html) (2021 or later) or [Brexit configuration](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) is enabled, 'United Kingdom-Northern Ireland' is a valid option.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* valid -\n\nAddress was validated successfully.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discounts applied to this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this deduction.\n", "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id of the line item that this deduction is for. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of discount that is applied to the line item. Relevant only when discounts[entity_type]\nis one of item_level_discount\n, item_level_coupon\n, document_level_discount\n, or document_level_coupon

\n* percentage -

when percentage is applied as discount

\n* fixed_amount -

when amount is applied as discount

", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "description" : "

The coupon code\n, if applicable, used to provide the discount. The coupon.id\nis available in entity_id\n.

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied to this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied. E.g. GST.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the tax item.\n", "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.\nIf there is no round-off amount\n, it will display 0\n.

", "minimum" : 0, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this invoice belongs to\n", "maxLength" : 100, "example" : null } }, "required" : [ "currency_code", "price_type", "recurring", "sub_total" ], "example" : null }, "example" : null }, "payment_schedule_estimates" : { "type" : "array", "deprecated" : false, "description" : "

payment_schedule_estimate\nis used to hold the details related to payment schedules for an invoice. It will contain a list of payment_schedules\nresources.

\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An auto-generated unique identifier for the payment schedule.\n", "maxLength" : 40, "example" : null }, "scheme_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the payment_schedule_scheme\n, used to create the payment schedules.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modeled entity that the payment schedule is based on.\n\\* invoice -\n\nRepresents an invoice.\n", "enum" : [ "invoice" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modeled entity that this payment schedule is based on.\n", "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "An amount that this payment schedule is able to collect.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the transaction amount.\n", "maxLength" : 3, "example" : null }, "schedule_entries" : { "type" : "array", "deprecated" : false, "description" : "List of schedule entries\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An auto-generated unique identifier for the payment schedule.\n", "maxLength" : 40, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when this payment schedule is scheduled.\n", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total maximum amount that this payment schedule is allowed to collect.\n", "minimum" : 0, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Defines the status of each payment schedule.\n\\* paid -\n\nIndicates that the payment has been made.\n\\* posted -\n\nIndicates that the payment is posted.\n\\* payment_due -\n\nIndicates that the payment is due.\n", "enum" : [ "posted", "payment_due", "paid" ], "example" : null } }, "required" : [ "amount", "date", "id", "status" ], "example" : null }, "example" : null } }, "required" : [ "amount", "entity_type", "id", "scheme_id" ], "example" : null }, "example" : null }, "next_invoice_estimate" : { "type" : "object", "deprecated" : false, "description" : "Represents the preview of the invoice generated at term end when the 'estimate' operations are invoked.\n", "properties" : { "recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Whether or not the estimate for the invoice is recurring. Will be 'true' or 'false' for subscription related estimates.\n", "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of this invoice.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the invoice.\n", "maxLength" : 3, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Invoice sub-total in cents.\n", "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Invoice total in cents.\n", "minimum" : 0, "example" : null }, "credits_applied" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "credits applied to this invoice in cents.\n", "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Existing outstanding payments if any, applied to this invoice in cents.\n", "minimum" : 0, "example" : null }, "amount_due" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Invoice amount due in cents\n", "minimum" : 0, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "

The details of the line items in this invoice estimate.

\n

Note

Line items that meet both the following conditions are not returned:

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this line item belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this line item.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this line item.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the line item.\n", "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "

Quantity of the recurring item\nwhich is represented by this line item. For metered\nline items, this value is updated from usages\nonce when the invoice is generated as pending\nand finally when the invoice is closed\n.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this line item. Typically equals to unit amount x quantity\n", "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models)\nfor this item price.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether this line item is taxed or not\n", "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The tax amount charged for this item\n", "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "Rate of tax used to calculate tax for this lineitem\n", "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this line\n", "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Line Item-level discounts for this line.\n", "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the line item is for a metered item. If true, the item is metered; otherwise, it is non-metered.

", "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the line item is percentage-based.\n", "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Invoice Reference Line Item ID\n", "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this line item.\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this item.\n", "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason due to which the line item price/amount is exempted from tax.

\n* zero_value_item -

If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.

\n* tax_not_configured_external_provider -

If the tax is not configured for the country in 3rd party tax provider.

\n* zero_rated -

If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item

\n* tax_not_configured -

If tax is not enabled for the site

\n* high_value_physical_goods -

If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied

\n* customer_exempt -

If the Customer is marked as Tax exempt

\n* export -

You are not registered for tax in the customer's region. This is also the reason code when both billing_address\nand shipping_address\nhave not been provided for the customer and subscription respectively

\n* reverse_charge -

If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only

\n* region_non_taxable -

If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction

\n* product_exempt -

If the Plan or Addon is marked as Tax exempt

", "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this line item belongs to\n", "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for this line item\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discount(s) applied for each line item of this invoice.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique id of the line item that this deduction is for.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* item_level_coupon -

The deduction is due to a coupon applied to a line item of the invoice. The coupon id\nis available as entity_id\n.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id\nis available as entity_id\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice. The entity_id\nis null\nin this case.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on line items\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period end of the tax rate for the line item.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period start of the tax rate for the line item.\n", "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Indicates the prorated line item amount in cents.\n", "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount\n", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* state -\n\nThe tax jurisdiction is a state\n\\* county -\n\nThe tax jurisdiction is a county\n\\* special -\n\nSpecial tax jurisdiction.\n\\* country -\n\nThe tax jurisdiction is a country\n\\* other -\n\nJurisdictions other than the ones listed above.\n\\* city -\n\nThe tax jurisdiction is a city\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* unincorporated -\n\nCombined tax of state and county.\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "line_item_credits" : { "type" : "array", "deprecated" : false, "description" : "A list of store credits applied to line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the credit note from which this credit is applied.\n", "maxLength" : 50, "example" : null }, "applied_amount" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The credit amount is applied to the line item.\n", "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the line item to which this credit is applied.\n", "maxLength" : 40, "example" : null } }, "required" : [ "applied_amount", "cn_id" ], "example" : null }, "example" : null }, "line_item_addresses" : { "type" : "array", "deprecated" : false, "description" : "The list of addresses used for tax calculation on line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Line item reference\n", "maxLength" : 40, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Name of the company\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "Name of the city\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address of the customer, specified as an [ISO 3166 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html).\nEntering an invalid code will return an error. \nIf [EU VAT](https://www.chargebee.com/docs/eu-vat.html) (2021 or later) or [Brexit configuration](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) is enabled, 'United Kingdom-Northern Ireland' is a valid option.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* valid -\n\nAddress was validated successfully.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discounts applied to this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this deduction.\n", "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id of the line item that this deduction is for. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of discount that is applied to the line item. Relevant only when discounts[entity_type]\nis one of item_level_discount\n, item_level_coupon\n, document_level_discount\n, or document_level_coupon

\n* percentage -

when percentage is applied as discount

\n* fixed_amount -

when amount is applied as discount

", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "description" : "

The coupon code\n, if applicable, used to provide the discount. The coupon.id\nis available in entity_id\n.

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied to this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied. E.g. GST.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the tax item.\n", "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.\nIf there is no round-off amount\n, it will display 0\n.

", "minimum" : 0, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this invoice belongs to\n", "maxLength" : 100, "example" : null } }, "required" : [ "currency_code", "price_type", "recurring", "sub_total" ], "example" : null }, "credit_note_estimates" : { "type" : "array", "deprecated" : false, "description" : "Represents the preview of the credit-notes generated during 'estimate' operation. Currently applicable only for the 'Update Subscription Estimate' operation.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "reference_invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The reference invoice id\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Credit note types. [Learn more](/docs/api/credit_notes/credit-note-object)\nabout credit note types.\n\\* refundable -\n\nRefundable Credit Note\n\\* adjustment -\n\nAdjustment Credit Note\n\\* store -\n\nStore Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of this credit note.\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the credit note.\n", "maxLength" : 3, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Invoice sub-total in cents.\n", "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Credit note total in cents.\n", "minimum" : 0, "example" : null }, "amount_allocated" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Allocated credits in cents.\n", "minimum" : 0, "example" : null }, "amount_available" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Remaining credits in cents\n", "minimum" : 0, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "The list of items in this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this line item belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this line item.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this line item.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the line item.\n", "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "

Quantity of the recurring item\nwhich is represented by this line item. For metered\nline items, this value is updated from usages\nonce when the invoice is generated as pending\nand finally when the invoice is closed\n.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this line item. Typically equals to unit amount x quantity\n", "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models)\nfor this item price.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether this line item is taxed or not\n", "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The tax amount charged for this item\n", "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "Rate of tax used to calculate tax for this lineitem\n", "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this line\n", "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Line Item-level discounts for this line.\n", "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the line item is for a metered item. If true, the item is metered; otherwise, it is non-metered.

", "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the line item is percentage-based.\n", "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Invoice Reference Line Item ID\n", "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this line item.\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this item.\n", "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason due to which the line item price/amount is exempted from tax.

\n* export -

You are not registered for tax in the customer's region. This is also the reason code when both billing_address\nand shipping_address\nhave not been provided for the customer and subscription respectively

\n* tax_not_configured -

If tax is not enabled for the site

\n* zero_value_item -

If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.

\n* product_exempt -

If the Plan or Addon is marked as Tax exempt

\n* reverse_charge -

If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only

\n* customer_exempt -

If the Customer is marked as Tax exempt

\n* zero_rated -

If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item

\n* tax_not_configured_external_provider -

If the tax is not configured for the country in 3rd party tax provider.

\n* high_value_physical_goods -

If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied

\n* region_non_taxable -

If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction

", "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this line item belongs to\n", "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for this line item\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discount(s) applied for each line item of this invoice.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique id of the line item that this deduction is for.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* item_level_coupon -

The deduction is due to a coupon applied to a line item of the invoice. The coupon id\nis available as entity_id\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice. The entity_id\nis null\nin this case.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id\nis available as entity_id\n.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on line items\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period end of the tax rate for the line item.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period start of the tax rate for the line item.\n", "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Indicates the prorated line item amount in cents.\n", "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount\n", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* county -\n\nThe tax jurisdiction is a county\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* city -\n\nThe tax jurisdiction is a city\n\\* state -\n\nThe tax jurisdiction is a state\n\\* country -\n\nThe tax jurisdiction is a country\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* other -\n\nJurisdictions other than the ones listed above.\n\\* special -\n\nSpecial tax jurisdiction.\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discounts applied to this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this deduction.\n", "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id of the line item that this deduction is for. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of discount that is applied to the line item. Relevant only when discounts[entity_type]\nis one of item_level_discount\n, item_level_coupon\n, document_level_discount\n, or document_level_coupon

\n* percentage -

when percentage is applied as discount

\n* fixed_amount -

when amount is applied as discount

", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "description" : "

The coupon code\n, if applicable, used to provide the discount. The coupon.id\nis available in entity_id\n.

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied to this estimate\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied. E.g. GST.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the tax item.\n", "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.\nIf there is no round-off amount\n, it will display 0\n.

", "minimum" : 0, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this credit note belongs to\n", "maxLength" : 100, "example" : null } }, "required" : [ "amount_allocated", "amount_available", "currency_code", "price_type", "reference_invoice_id", "sub_total", "total", "type" ], "example" : null }, "example" : null }, "unbilled_charge_estimates" : { "type" : "array", "deprecated" : false, "description" : "Represents the preview of the unbilled charges generated during 'estimate' operation. Currently not applicable for the 'Subscription renewal estimate' operation.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies an unbilled charge.\n", "maxLength" : 40, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer being charged.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this charge belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this charge.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this charge.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the charge item.\n", "minimum" : 0, "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The pricing scheme for this line item.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Quantity of the item which is represented by this charge.\n", "minimum" : 0, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this charge. Typically equals to unit amount x quantity.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the charge.\n", "maxLength" : 3, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this charge.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this charge.\n", "maxLength" : 250, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this charge is based on. Will be null for 'adhoc' entity type.\n", "maxLength" : 100, "example" : null }, "is_voided" : { "type" : "boolean", "default" : false, "deprecated" : false, "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.\n", "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating the date and time this charge got voided.\n", "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the charge, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of this entity. Returned when the entity is quantity-based and [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the unbilled charge was created.\n", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the unbilled charge was last updated\n", "example" : null }, "tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for this line item\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "is_advance_charge" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "The value of this parameter will be true if it is a recurring unbilled charge for a future term.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the\n[business entity](/docs/api/getting-started)\nof this subscription. This is always the same as the\n[business entity](/docs/api/subscriptions/subscription-object#customer_id)\nof the customer.\n", "maxLength" : 50, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates that this resource has been deleted.\n", "example" : null } }, "required" : [ "currency_code", "deleted", "entity_type", "is_voided", "updated_at" ], "example" : null }, "example" : null } }, "required" : [ "created_at" ], "example" : null }, "Event" : { "type" : "object", "description" : "

Introduction

When important changes occur on your Chargebee site, they are recorded as events. An event contains data about the affected resources and metadata, such as the timestamp of the change. For example, when a subscription is canceled due to non-payment, an event such as subscription_cancelled is recorded.

Webhooks

If webhooks are configured in Chargebee, events trigger those webhooks. If multiple webhooks are configured, Chargebee calls each webhook sequentially for every event. If a webhook call fails or times out, it is retried based on a fixed schedule. The webhook call is an HTTP POST with the content type application/json.

Retries and Duplicate Handling

To mark a webhook notification successful, the webhook must return an HTTP status code in the 2XX range. If a 2XX response is not received, Chargebee retries the webhook call with increasing delays for up to 2 days. You can also resend webhook calls manually from the web console.\nDue to webhook retries, it is possible that your application receives the same webhook more than once. Detect such duplicates within your application to ensure the idempotency of the webhook call. This can be done by examining the id parameter since its value uniquely identifies an event.\nFor example, your application can do the following for each webhook notification:

    \n
  1. Get the event id and keep it in a persistent store such as a relational database or redis.
  2. \n
  3. Check whether the event id is already processed.
  4. \n
  5. If the event has not been processed, process it; otherwise, it is a duplicate event, so it can be ignored.
  6. \n
  7. Also, since the last retry for a webhook happens around 3 days and 7 hours after the original event trigger, keep the idempotency window at 3 days and 7 hours. In other words, you can purge stored event IDs that are older than 3 days and 7 hours.
  8. \n

Out-of-order Delivery

Webhooks can also arrive at your application out-of-order. This can be due to issues such as network delays or webhook failures. However, you can order the events by examining the resource_version attribute of the resource sent by the webhook. For every change made to the resource, resource_version is updated with a new timestamp in milliseconds.\nFor example, if you wish to sync resource changes from Chargebee to your application, you can:

    \n
  1. Get the value rv1 of the resource_version attribute from the resource in the webhook.
  2. \n
  3. Get the value rv2 of resource_version from the resource stored on your side.
  4. \n
  5. If rv1 > rv2, process the resource; otherwise, ignore.
  6. \n

API Version\nChargebee supports multiple API versions now. The api_version attribute indicates the API version based on which the event content is structured. While processing webhooks, ensure that api_version is the same as the API version used by your webhook server's client library.

Securing Your Webhook URL

You can have basic authentication\nfor the webhook URL.

    \n
  1. On the Webhook Settings page (Settings > Configure Chargebee > Webhooks), select the webhook tab and check the option My webhook URL is protected by basic authentication.
  2. \n
  3. Enter Username and Password and click Update Webhook.\nOR\nGenerate a random key and have it as part of your webhook URL\neg, http://yourapp.com/chargebee-webhook/cuktqaem0i2fkd5jt9cdtojcn9cvb3Y
  4. \n

In addition to securing your webhook, you can ensure the integrity of the event data by fetching it again using the Retrieve an Event\nAPI call.

About Webhook IP Addresses

Webhooks from Chargebee originate from a specific set of IP addresses.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of an event.\n", "maxLength" : 40, "example" : null }, "occurred_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this event had occurred.\n", "example" : null }, "source" : { "type" : "string", "default" : "none", "deprecated" : false, "description" : "Indicates the origin of the operation that triggered the event.\n\\* admin_console -\n\nThe event was triggered by an operation performed through the [Chargebee Billing dashboard](https://app.chargebee.com)\n.\n\\* external_service -\n\nThe event was triggered by an operation associated with a webhook.\n\\* scheduled_job -\n\nThe event was triggered by a scheduled job in Chargebee Billing.\n\\* bulk_operation -\n\nThe event was triggered by a [bulk operation](https://www.chargebee.com/docs/billing/2.0/data-operations/bulk-operations)\ninitiated by you in Chargebee Billing.\n\\* hosted_page -\n\nThe event was triggered by an operation performed by the customer through one of the [Chargebee Hosted Pages](/docs/api/hosted_pages)\n.\n\\* portal -\n\nThe event was triggered by an operation performed by a customer through the [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html)\n.\n\\* system -\n\nThe event was triggered automatically by Chargebee Billing.\n\\* migration -\n\nThe event was triggered by the migration of customer data into Chargebee Billing, either from an external system or from another [Chargebee Billing site](https://www.chargebee.com/docs/billing/2.0/getting-started/sites-intro)\n(such as test, live, or sandbox).\n\\* none -\n\nNo source can be identified for the event.\n\\* api -\n\nThe event was triggered by an operation performed through the [public API](/docs/api/getting-started)\n.\n\\* js_api -\n\nThe event was triggered by an operation performed through [Chargebee JS](https://www.chargebee.com/checkout-portal-docs/)\n.\n", "enum" : [ "admin_console", "api", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "bulk_operation", "external_service" ], "example" : null }, "user" : { "type" : "string", "deprecated" : false, "description" : "

The "user" that triggered the event. The value depends on the source

\n", "maxLength" : 150, "example" : null }, "event_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of event provided by Chargebee. See event types\nfor a complete list.

\n* card_deleted -

Sent when a card is deleted for a customer

\n* rule_created -

Triggered when a rule is created.

\n* 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'.

\n* omnichannel_subscription_item_updated -

Triggered when an omnichannel subscription item is updated.

\n* customer_changed -

Sent when a customer is changed

\n* invoice_deleted -

Event triggered when an invoice is deleted.

\n* omnichannel_subscription_item_changed -

Triggered when an omnichannel subscription item is changed

\n* subscription_shipping_address_updated -

Triggered when shipping address is added or updated for a subscription.

\n* differential_price_created -

Triggered when a differential price is created

\n* subscription_created -

Sent when a new subscription is created.

\n* payment_initiated -

Sent when a payment is initiated via direct debit

\n* quote_updated -

Triggered when quote is updated

\n* payment_source_added -

Sent when a payment source is added for a customer.

\n* contract_term_created -

Triggered when new contract term is created

\n* subscription_business_entity_changed -

Sent when a subscription's business entity is changed.

\n* subscription_deleted -

Sent when a subscription has been deleted

\n* differential_price_deleted -

Triggered when a differential price is deleted

\n* omnichannel_subscription_created -

Triggered when an omnichannel subscription is created

\n* voucher_created -

Triggered when a payment voucher is created.

\n* subscription_ramp_drafted -

Triggered when a subscription ramp is moved to draft status.

\n* rule_deleted -

Triggered when a rule is deleted.

\n* transaction_deleted -

Triggered when a transaction is deleted.

\n* item_family_deleted -

Triggered when an item family is deleted

\n* payment_failed -

Sent when attempt to charge customer's credit card fails

\n* subscription_reactivated_with_backdating -

Sent when the subscription is moved from cancelled state to active or in_trial state with past date

\n* omnichannel_subscription_item_cancellation_scheduled -

Triggered when an omnichannel subscription item is scheduled for cancellation

\n* omnichannel_subscription_item_resumed -

Triggered when an omnichannel subscription item is resumed

\n* payment_source_expiring -

Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date.

\n* payment_schedules_created -

Event triggered when new payment schedules are created for an invoice

\n* subscription_entitlements_updated -

Triggered when subscription entitlements are updated for a subscription change.

\n* price_variant_updated -

Triggered when a price variant is updated.

\n* omnichannel_subscription_item_dunning_expired -

Triggered when an omnichannel subscription item's dunning has expired

\n* item_price_updated -

Triggered when an item price is updated

\n* order_ready_to_process -

Triggered when order reaches its order date

\n* entitlement_overrides_updated -

Triggered when an override entitlement is updated

\n* item_updated -

Triggered when an item is updated

\n* coupon_set_updated -

Sent when a coupon set is changed

\n* subscription_reactivated -

Sent when the subscription is moved from cancelled state to active or in_trial state

\n* subscription_scheduled_changes_removed -

Sent when scheduled change for the subscription is removed.

\n* customer_business_entity_changed -

Sent when a customer's business entity is changed.

\n* payment_refunded -

Sent when a payment refund is made

\n* subscription_started -

Sent when a 'future' subscription gets started at the scheduled date.

\n* attached_item_created -

Triggered when an Attached item is created

\n* token_created -

Sent when a Token is created

\n* item_family_created -

Triggered when an item family is created

\n* subscription_created_with_backdating -

Sent when a new subscription is created with backdating.

\n* unbilled_charges_deleted -

Triggered when unbilled charges are deleted.

\n* omnichannel_subscription_item_renewed -

Triggered when an omnichannel subscription item is renewed

\n* subscription_ramp_applied -

Triggered when a subscription ramp is applied.

\n* promotional_credits_added -

Sent when promotional credits are added to a customer.

\n* 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'.

\n* item_entitlements_updated -

Triggered when item entitlements are updated to a feature

\n* card_expired -

Sent when a card for a customer is expired

\n* payment_intent_created -

Sent when a Payment intent is created

\n* subscription_changed_with_backdating -

Sent after the subscription's recurring items have been changed with backdated date

\n* subscription_scheduled_cancellation_removed -

Sent when scheduled cancellation is removed for the subscription.

\n* omnichannel_subscription_item_resubscribed -

Triggered when an omnichannel subscription item is resubscribed

\n* feature_updated -

Triggered when an feature is updated

\n* payment_schedule_scheme_created -

Event triggered when a new payment schedule scheme is created

\n* omnichannel_subscription_imported -

Triggered when an omnichannel subscription item is imported

\n* vault_token_created -

Triggered when a payment method is tokenized and stored in the vault.

\n* tax_withheld_refunded -

Sent when a tax withheld refund is made

\n* unbilled_charges_voided -

Triggered when unbilled charges are voided.

\n* customer_moved_out -

Sent when a customer is copied to another site

\n* dunning_updated -

Sent when dunning is paused for an invoice.

\n* feature_created -

Triggered when a feature is created.

\n* record_purchase_failed -

Triggered when an omnichannel record purchase is failed

\n* coupon_codes_deleted -

Sent when coupon codes are deleted in coupon set

\n* subscription_paused -

Sent when the subscription is paused.

\n* order_updated -

Triggered when order is updated

\n* subscription_movement_failed -

Triggered when a subscription movement failed

\n* unbilled_charges_created -

Triggered when unbilled charges are created.

\n* subscription_moved_in -

Triggered when a subscription moved from other customer

\n* feature_archived -

Triggered when a feature is archived.

\n* subscription_ramp_deleted -

Triggered when a subscription ramp is deleted.

\n* payment_succeeded -

Sent when the payment is successfully collected

\n* voucher_expired -

Triggered when a payment voucher is expired.

\n* mrr_updated -

Sent when either of MRR or CMRR of a subscription changes

\n* subscription_scheduled_resumption_removed -

Triggered when scheduled resumption is removed for the subscription.

\n* subscription_changes_scheduled -

Sent when subscription changes are scheduled for later. Changes will be applied at the end of current term.

\n* order_ready_to_ship -

Triggered when order reaches its shipping date

\n* omnichannel_subscription_item_cancelled -

Triggered when an omnichannel subscription item is cancelled

\n* payment_due_reminder -

Sent after scheduled days of payment failure

\n* purchase_created -

Triggered when purchase action completed successfully

\n* subscription_trial_end_reminder -

Sent when the customer's trial period is about to end.

\n* feature_activated -

Triggered when a feature status transitions to active for the first time.

\n* subscription_renewed -

Sent when the subscription is renewed from the current term.

\n* vault_token_deleted -

Triggered when a vaulted payment method is deleted from the vault.

\n* item_created -

Triggered when an item is created

\n* coupon_codes_updated -

Sent when coupon codes are updated

\n* gift_unclaimed -

Triggered when a new gift is unclaimed and is ready to be claimed

\n* subscription_entitlements_created -

Triggered when subscription entitlements are created for a new subscription

\n* subscription_ramp_updated -

Triggered when a subscription ramp is updated.

\n* virtual_bank_account_added -

Sent when a virtual bank account is added for a customer.

\n* subscription_moved_out -

Triggered when a subscription moved to other customer

\n* contract_term_completed -

Triggered when contract term is completed

\n* feature_deleted -

Triggered when a feature is deleted

\n* subscription_renewal_reminder -

Sent before each subscription's renewal based on plan's period

\n* coupon_updated -

Sent when a coupon is changed.

\n* token_consumed -

Sent when a Token is consumed

\n* omnichannel_subscription_item_upgraded -

Triggered when an omnichannel subscription item is upgraded

\n* transaction_created -

Triggered when a transaction is recorded

\n* payment_schedule_scheme_deleted -

Event triggered when a payment schedule scheme is deleted

\n* customer_deleted -

Sent when a customer is deleted

\n* subscription_items_renewed -

Sent when one or more Subscription Items are renewed

\n* coupon_deleted -

Sent when a coupon is deleted.

\n* quote_deleted -

Triggered when quote is deleted

\n* card_updated -

Sent when the card is updated for a customer.

\n* coupon_created -

Sent when a coupon is created.

\n* quote_created -

Triggered when quote is created

\n* add_usages_reminder -

Sent every month day before renewal date of plan's period

\n* business_entity_updated -

Sent when a business entity is updated.

\n* subscription_changed -

Sent after the subscription's recurring items have been changed

\n* customer_created -

Sent when a new customer is created, either directly or automatically during subscription creation.

\n* price_variant_created -

Triggered when a price variant is created.

\n* coupon_set_deleted -

Sent when a coupon set is deleted

\n* refund_initiated -

Sent when a refund is initiated via direct debit

\n* order_cancelled -

Triggered when order is cancelled

\n* entitlement_overrides_removed -

Triggered when an override entitlement is removed

\n* coupon_codes_added -

Sent when coupon codes are added in coupon set

\n* omnichannel_subscription_item_paused -

Triggered when an omnichannel subscription item is paused

\n* card_added -

Sent when a card is added for a customer.

\n* gift_cancelled -

Triggered when a gift is cancelled.

\n* entitlement_overrides_auto_removed -

Triggered when Subscription entitlements overrides for a feature are auto removed after expiry

\n* omnichannel_subscription_moved_in -

Triggered when an omnichannel subscription is moved to another customer

\n* omnichannel_subscription_item_downgraded -

Triggered when an omnichannel subscription item is downgraded

\n* ledger_updated -

Triggered when a batch of ledger_operations is persisted for a subscription unit. The event content includes the related ledger_operations, ledger_account_balance, grant_blocks, and ledger_entries.

\n* payment_source_deleted -

Sent when a payment source is deleted for a customer

\n* omnichannel_transaction_created -

Triggered when an omnichannel transaction is created.

\n* grant_blocks_created -

Triggered when one or more grant_blocks are created for a subscription unit.

\n* credit_note_created -

Sent when a credit note is created

\n* subscription_resumption_scheduled -

Triggered when the subscription resumption is scheduled.

\n* item_price_deleted -

Triggered when an item price is deleted

\n* subscription_advance_invoice_schedule_updated -

Triggered when scheduled advance invoice is updated for a subscription.

\n* item_deleted -

Triggered when an item is deleted

\n* omnichannel_one_time_order_item_cancelled -

Triggered when an omnichannel one time order item is cancelled

\n* gift_claimed -

Triggered when a gift is claimed

\n* feature_reactivated -

Triggered when a feature status transitions to active for the second time or more.

\n* vault_token_updated -

Triggered when a vaulted payment method is updated.

\n* subscription_activated -

Sent after the subscription has been moved from trial to active state

\n* subscription_resumed -

Sent when the subscription is moved from paused state to active state

\n* sales_order_updated -

Triggered when a sales order is updated.

\n* credit_note_deleted -

Sent when a credit note is deleted

\n* item_price_entitlements_removed -

Triggered when item price entitlements are removed for a feature

\n* subscription_advance_invoice_schedule_added -

Triggered when advance invoice is scheduled for a subscription.

\n* differential_price_updated -

Triggered when a differential price is updated

\n* alert_status_changed -

Triggered when an alert's runtime status for a subscription changes between IN_ALARM and WITHIN_LIMIT.\nThis indicates a change in the subscription's usage relative to the alert threshold and applies only to usage-based billing.

\n* order_deleted -

Triggered when order is deleted

\n* omnichannel_subscription_item_scheduled_cancellation_removed -

Triggered when an omnichannel subscription item scheduled cancellation is removed

\n* token_expired -

Sent when a Token is expired

\n* price_variant_deleted -

Triggered when a price variant is deleted.

\n* 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.

\n* subscription_cancellation_reminder -

Sent when the customer's subscription is nearing its scheduled cancellation date.

\n* rule_updated -

Triggered when a rule is updated.

\n* omnichannel_subscription_item_reactivated -

Triggered when an omnichannel subscription item's refund is reversed

\n* 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.

\n* order_delivered -

Triggered when order is marked as delivered

\n* 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.

\n* subscription_ramp_created -

Triggered when a subscription ramp is created.

\n* omnichannel_subscription_item_expired -

Triggered when an omnichannel subscription item is expired

\n* authorization_succeeded -

Triggered when an authorization transaction is created.

\n* invoice_generated_with_backdating -

Event triggered when a new invoice is generated with past date as invoice date.

\n* omnichannel_subscription_item_change_scheduled -

Triggered when an omnichannel subscription item change is scheduled

\n* subscription_cancellation_scheduled -

Sent when subscription is scheduled to cancel at end of current term

\n* order_created -

Triggered when order is created

\n* hierarchy_deleted -

Triggered when a hierarchy is deleted

\n* subscription_activated_with_backdating -

Sent after the subscription changes to active from another status, while the change is backdated.

\n* tax_withheld_recorded -

Triggered when a tax withheld is recorded for an invoice

\n* credit_note_created_with_backdating -

Sent when a credit note is created with past date as credit note date

\n* omnichannel_subscription_item_pause_scheduled -

Triggered when an omnichannel subscription item scheduled for pause

\n* gift_updated -

Triggered when a gift is updated

\n* order_resent -

Triggered when order is resent

\n* hierarchy_created -

Triggered when a hierarchy is created

\n* voucher_create_failed -

Triggered when a payment voucher creation fails.

\n* customer_moved_in -

Sent when a customer is copied from another site

\n* customer_entitlements_updated -

Triggered when entitlements for the list of customers got updated.

\n* item_price_entitlements_updated -

Triggered when item Price entitlements are updated to a feature

\n* omnichannel_subscription_item_grace_period_expired -

Triggered when an omnichannel subscription item's grace period has expired

\n* attached_item_deleted -

Triggered when an Attached item is deleted

\n* unbilled_charges_invoiced -

Triggered when unbilled charges are invoiced.

\n* subscription_pause_scheduled -

Sent when the subscription is scheduled to pause.

\n* order_returned -

Triggered when order is marked as returned

\n* payment_source_expired -

Sent when a payment source for a customer is expired

\n* contract_term_terminated -

Triggered when contract term is terminated

\n* payment_source_updated -

Sent when the payment source is updated for a customer or when role is assigned to the payment source.

\n* pending_invoice_updated -

Triggered when you make the following changes to a pending invoice: add a charge, add a non-recurring addon, or delete a line item.

\n* omnichannel_subscription_item_grace_period_started -

Triggered when an omnichannel subscription item's grace period has started

\n* subscription_advance_invoice_schedule_removed -

Triggered when scheduled advance invoice is removed for a subscription.

\n* tax_withheld_deleted -

Triggered when a tax withheld is deleted

\n* omnichannel_subscription_item_dunning_started -

Triggered when an omnichannel subscription item's dunning has started

\n* business_entity_created -

Sent when a business entity is created.

\n* sales_order_created -

Triggered when a sales order is created.

\n* item_price_created -

Triggered when an item price is created

\n* virtual_bank_account_updated -

Sent when the virtual bank account is updated for a customer.

\n* credit_note_updated -

Sent when a credit note is updated

\n* subscription_scheduled_pause_removed -

Triggered when scheduled pause is removed for the subscription.

\n* card_expiry_reminder -

Sent 30 days before the customer's credit card expires.

\n* coupon_set_created -

Sent when a coupon set is created

\n* virtual_bank_account_deleted -

Sent when a virtual bank account is deleted for a customer.

\n* omnichannel_one_time_order_created -

Triggered when an omnichannel one time order is created

\n* gift_scheduled -

Triggered when a new gift is created

\n* payment_schedules_updated -

Event triggered when payment schedules are updated for an invoice

\n* business_entity_deleted -

Sent when a business entity is deleted.

\n* omnichannel_subscription_item_recovered -

Triggered when an omnichannel subscription item recovers from a billing issue and is active again.

\n* promotional_credits_deducted -

Sent when a customer prmotion credits deducted

\n* ledger_account_balance_updated -

Triggered when a ledger_account_balance changes for a subscription unit.

\n* contract_term_renewed -

Triggered when new contract term is renewed

\n* usage_file_ingested -

Triggered when a usage_file\nis successfully ingested.

\n* subscription_trial_extended -

Sent when a subscription trial is extended.

\n* item_entitlements_removed -

Triggered when item entitlements are removed for a feature

\n* gift_expired -

Triggered when a gift expires

\n* omnichannel_subscription_item_scheduled_change_removed -

Triggered when an omnichannel subscription item scheduled change is removed

\n* contract_term_cancelled -

Triggered when contract term is cancelled

\n* authorization_voided -

Triggered when an 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.

\n* item_family_updated -

Triggered when an item family is updated

\n* attached_item_updated -

Triggered when an Attached item is updated

\n* invoice_updated -

Triggered when changes are made to a finalized invoice, including voiding, deletion, invoice address updates, status changes, and payment changes such as applying or removing a payment, applying or removing a credit, and credit note creation. pending_invoice_updated is triggered for changes specific to pending invoices; invoice_updated covers all other invoice changes.

\n* grant_blocks_updated -

Triggered when one or more grant_blocks are updated for a subscription unit.

\n* payment_intent_updated -

Sent when a Payment intent is updated

\n* payment_source_locally_deleted -

Sent when a payment source for a customer removed from Chargebee

", "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "api_version" : { "type" : "string", "default" : "v1", "deprecated" : false, "description" : "The Chargebee API version used to render this event content. When processing webhooks, ensure that this version matches the one used by your webhook server's client library.\n\\* v1 -\n\nChargebee API version V1\n\\* v2 -\n\nChargebee API version V2\n", "enum" : [ "v1", "v2" ], "example" : null }, "content" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "The JSON data associated with this event. Has resources (\\*subscription\\* , \\*invoice\\* etc) based on the \\[event type\\](/docs/api/events/event-types). These resources are structured based on the Chargebee API version indicated by the \\*api_version\\* attribute.\n", "example" : null }, "origin_user" : { "type" : "string", "deprecated" : false, "description" : "

The email address of the user, if captured, in the API operation that triggered the event. This email address is captured through either the chargebee-request-origin-user or chargebee-request-origin-user-encoded custom HTTP request headers.

\n

Note:\nApplicable only when event_source is api.

", "example" : null }, "webhooks" : { "type" : "array", "deprecated" : false, "description" : "

Array of webhook call statuses: one for each of the webhooks configured for the site. This object is only available after the first webhook call for the event has completed or timed out. Also, creation/updation of the webhook\nobject data is a queued operation and hence there can be an additional delay of up to 5 seconds.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of a webhook.\n", "maxLength" : 40, "example" : null }, "webhook_status" : { "type" : "string", "deprecated" : false, "description" : "\n* disabled -

Disabled as no longer used

\n* failed -

Webhook call has been suspended after the all retries have resulted in failure.

\n* succeeded -

Webhook call was successful.

\n* rate_limited -

Webhook call was rate limited.

\n* scheduled -

Webhook call has been scheduled.

\n* re_scheduled -

Webhook call has been rescheduled due failure(s) in previous call(s)

\n* not_applicable -

Webhook call is not applicable for this event.

\n* skipped -

Skipped as specified in request

\n* not_configured -

Webhook was not configured when this event occurred

", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "example" : null } }, "required" : [ "id", "webhook_status" ], "example" : null }, "example" : null } }, "required" : [ "content", "id", "occurred_at", "source" ], "example" : null }, "EventName" : { "type" : "string", "deprecated" : false, "enum" : [ "cancellation_page_loaded" ], "example" : null }, "EventType" : { "type" : "string", "deprecated" : false, "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "ExcludeTaxType" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "exclusive", "none" ], "example" : null }, "Export" : { "type" : "object", "description" : "Export resource represents an export job and contains the status of the job and the download URL, if the job is successfully completed.\n\nExport operations are asynchronous and will return \"Export\" resource in response . The export resource will contain the status of the export job (like in-process, completed...) . If the status is completed, it will contain the download url pointing to the zip/pdf containing the exported data.\n\n**Note:** At any given point, only 5 export jobs can be processed. Beyond that, an error stating that the API request limit has been reached will be returned.\n\n**Note:** Export operations are eventually consistent, so exported data might not reflect a recent write. For more information, see [Read consistency](/docs/api/read-consistency).\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier to identify the export\n", "maxLength" : 50, "example" : null }, "operation_type" : { "type" : "string", "deprecated" : false, "description" : "Describes the type of export\n", "maxLength" : 100, "example" : null }, "mime_type" : { "type" : "string", "default" : "zip", "deprecated" : false, "description" : "Describes the mime type of download file\n\\* pdf -\n\nPDF\n\\* zip -\n\nZIP\n", "enum" : [ "pdf", "zip" ], "example" : null }, "status" : { "type" : "string", "default" : "in_process", "deprecated" : false, "description" : "Current status of the export operation\n\\* completed -\n\nCompleted\n\\* failed -\n\nFailed\n\\* in_process -\n\nIn Process\n", "enum" : [ "in_process", "completed", "failed" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Export created time\n", "example" : null }, "download" : { "type" : "object", "deprecated" : false, "description" : "Returns the download_url for the export. The download URL is valid upto a specific date.\n", "properties" : { "download_url" : { "type" : "string", "deprecated" : false, "description" : "The URL at which the file is available for download.\n", "maxLength" : 3500, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time until which the download_url\nis valid.

", "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "description" : "The [media type](https://en.wikipedia.org/wiki/Media_type)\nof the file.\n", "maxLength" : 100, "example" : null } }, "required" : [ "download_url", "valid_till" ], "example" : null } }, "required" : [ "created_at", "id", "mime_type", "operation_type", "status" ], "example" : null }, "ExportType" : { "type" : "string", "default" : "data", "deprecated" : false, "enum" : [ "data", "import_friendly_data" ], "example" : null }, "FailedUsageEvent" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "usage_timestamp" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "ingestion_timestamp" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "properties" : { "type" : "string", "deprecated" : false, "example" : null }, "error_codes" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "event_meta" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null } }, "required" : [ "error_codes", "event_meta", "ingestion_timestamp", "properties", "subscription_id" ], "example" : null }, "FamAutoCalcRequest" : { "type" : "object", "properties" : { "status" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "request_type" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "version" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "fault_trace" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "retry_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null } }, "example" : null }, "FamManualCalcRequest" : { "type" : "object", "properties" : { "feature_id" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "request_type" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "version" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "fault_trace" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "retry_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null } }, "example" : null }, "Feature" : { "type" : "object", "additionalProperties" : true, "description" : "Subscriptions are created in Chargebee using items. Items represent the products or services that you offer to your customers. Items often differ in the number of product features that are available to them. The Features API helps you define the various features offered as part of your product line. It also defines the entitlements that items and subscriptions can have towards said features. \n**Note**\n\nThe maximum number of features a site can have is 400.\n\nFeatures of this API\n--------------------\n\nThe Features API enables you to:\n\n* Define the set of features provided by your product.\n* Specify the entitlements that items have towards said features.\n* For a given subscription, modify the entitlements inherited from items in the subscription.\n* Offer additional feature entitlements to subscriptions than those inherited from items in the subscription.\n* Serve as a source of truth to your provisioning systems for subscription entitlements.\n* Use entitlement information to understand which features drive value and revenue.\n\n**See also**\n\n* [Entitlements](/docs/api/entitlements)\n* [Subscription Entitlements](/docs/api/subscription_entitlements)\n* [Entitlement Overrides](/docs/api/entitlement_overrides)\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

A unique and immutable identifier for the feature. You can set it yourself, in which case it is recommended that a human-readable format (or slug) be used. For example, number-of-users-ccjht01.\nWhen not provided, a random value is automatically set.

", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive unique name for the feature. For example: user license\n, data storage\n, Salesforce Integration\n, devices\n, UHD Streaming\n, and so on.

\n

Note:\nThis name is not displayed on any customer-facing documents or pages such as invoice PDFs\nor hosted pages.\nHowever, in the future, it is likely to be introduced on the Self-Serve Portal\n.

", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "

A brief description of the feature. For example: Access to 10TB cloud storage\n.

", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The current status of the feature.

\n* active -

A draft\nor an archived\nfeature can be changed to active.\nAny entitlements\nor subscription entitlements\ndefined for the feature take effect immediately.

\n* draft -

The feature is in an unpublished state. Entitlements\nand subscription entitlements\ncan be created for a draft feature but they are not effective until the feature is active. A feature status\ncannot be changed back to draft\nonce it is in active\nor archived\nstatus\n.

\n* archived -

An active\nfeature can be changed to archived.\nOnce archived\n, no new\nentitlements\nor subscription entitlements\ncan be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active\n, remain effective.

", "enum" : [ "active", "archived", "draft" ], "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of feature.

\n* quantity -

The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with name\nsuch as number of users\ncan have entitlement levels of say, 5\n, 20\n, 50\n, and 100.\nlevels[is_unlimited]\nis used for specifying the "unlimited" entitlement level.

\n* range -

The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as number of users\ncan have entitlement levels starting at 5\nusers and go up to 50000.\nlevels[is_unlimited]\nis used for specifying the "unlimited" entitlement level.

\n* switch -

A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all.

\n* custom -

The entitlement levels available for this feature are defined as a set of custom values. For example, a feature Email Support\ncan have entitlement levels as 24×7\nand 24×5\n.

", "enum" : [ "switch", "custom", "quantity", "range" ], "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "description" : "

For features of type\nquantity\nor range\n, this specifies the unit of measure. The value is expected in the singular form and when used by the system, it is pluralized automatically as needed. For example, for a feature such as user licenses\n, the unit\ncan be license\n.

", "maxLength" : 50, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When the feature was created.\n", "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if the feature is a metered feature\n", "example" : null }, "levels" : { "type" : "array", "deprecated" : false, "description" : "

An ordered list of entitlement levels available for the feature. This is only applicable when type\nis other than switch\n.\nNote:\nWhen the type\nof the feature is switch\n, this is not applicable. This is because any given entity can be either fully entitled to a switch\nfeature or not entitled at all; there are no intermediate entitlement levels.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive display name for the entitlement level. Provide a name that helps you clearly identify the entitlement level. For example: a feature such as Email Support\ncan have entitlement levels named as All weekdays\n, All days\n, 40 hours per week\nand so on.

\n

When not provided for feature.type\nquantity\nor range\n, this name is auto-generated as the space-separated concatenation of levels[].value\nand the pluralized version of unit.\nFor example, if levels[].value\nis 20\nand unit\nis user\n, then levels[].name\nbecomes 20 users\n.

", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

The value denoting the entitlement level granted.

\n", "maxLength" : 50, "example" : null }, "level" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

This attribute represents the order of the entitlement levels from lowest to highest.

\n\n

When not defined, it is assumed as the index of the levels[]\narray.

", "example" : null }, "is_unlimited" : { "type" : "boolean", "deprecated" : false, "description" : "

When type\nis quantity\nor range\n, this attribute indicates whether the entitlement level corresponds to unlimited units of the feature. Possible values:

\n", "example" : null } }, "required" : [ "is_unlimited", "level", "value" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "id", "metered", "name" ], "example" : null }, "FeatureActivatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" }, "impacted_item" : { "$ref" : "#/components/schemas/ImpactedItem" }, "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" } }, "required" : [ "feature", "impacted_item", "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "FeatureArchivedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" } }, "required" : [ "feature", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "FeatureAvailabilityMetric" : { "type" : "object", "properties" : { "state" : { "type" : "string", "deprecated" : false, "enum" : [ "draft", "active", "archived", "deleted" ], "example" : null }, "count" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "last_updated_at" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null } }, "example" : null }, "FeatureCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" }, "impacted_item" : { "$ref" : "#/components/schemas/ImpactedItem" }, "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" } }, "required" : [ "feature", "impacted_item", "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "FeatureDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" }, "impacted_item" : { "$ref" : "#/components/schemas/ImpactedItem" }, "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" } }, "required" : [ "feature", "impacted_item", "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "FeatureReactivatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" } }, "required" : [ "feature", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "FeatureUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" } }, "required" : [ "feature", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "FilterCondition" : { "type" : "object", "description" : "

One row of the filter_conditions composite on a global alert. It limits which subscriptions the alert applies to. When creating an alert, pass parallel arrays filter_conditions[field][], filter_conditions[operator][], and filter_conditions[value][]; values at the same index define one condition.

", "properties" : { "field" : { "type" : "string", "deprecated" : false, "description" : "

Subscription attribute to filter on. The API allows only plan_price_id (request parameter filter_conditions[field][]).

\n* plan_price_id -

Compares against the subscription’s plan price identifier.

", "enum" : [ "plan_price_id" ], "example" : null }, "operator" : { "type" : "string", "deprecated" : false, "description" : "

How field is compared to value (filter_conditions[operator][]).

\n* equals -

The plan price attribute must equal this condition’s value.

\n* not_equals -

The plan price attribute must not equal this condition’s value.

", "enum" : [ "equals", "not_equals" ], "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

Operand for the operator, typically a plan price identifier. String, up to 50 characters (filter_conditions[value][]).

", "maxLength" : 50, "example" : null } }, "required" : [ "field", "operator", "value" ], "example" : null }, "FreePeriodUnit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "week", "month", "year" ], "example" : null }, "FriendOfferType" : { "type" : "string", "deprecated" : false, "enum" : [ "none", "coupon", "coupon_code" ], "example" : null }, "FullExport" : { "type" : "object", "description" : "The Full Export API allows bulk download of various datasets from a secure location where data is loaded daily on a predefined schedule. Users can request dataset downloads by specifying the dataset name and date, among others. All the records of a given day (from 12:00 a.m. to 11:59 p.m. UTC) are available to query by the following day. The API responds with a download URL upon successful availability.\n", "properties" : { "table" : { "type" : "string", "deprecated" : false, "description" : "The name of the table from which the data has been exported. For example, invoices.\n", "maxLength" : 200, "example" : null }, "status" : { "type" : "string", "default" : "in_process", "deprecated" : false, "description" : "Represents the current status of the export. For example, Completed, In Progress, etc.\n\\* failed -\n\nWhen the export is failed.\n\\* completed -\n\nWhen the export is completed.\n\\* in_process -\n\nWhen the export is in process.\n", "enum" : [ "in_process", "completed", "failed" ], "example" : null }, "export_date" : { "type" : "string", "format" : "date", "deprecated" : false, "description" : "The date for which the data is being exported. It's formatted in the YYYY-MM-DD format. For instance, if retrieving data relevant to September 10, 2023, the export_date would be 2023-09-10.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "A timestamp representing when the export was initiated. For example, 1693383422.\n", "example" : null }, "download" : { "type" : "object", "deprecated" : false, "description" : "Returns the download_url for the export. The download URL is valid upto a specific date.\n", "properties" : { "download_url" : { "type" : "string", "deprecated" : false, "description" : "The URL at which the file is available for download.\n", "maxLength" : 3500, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time until which the download_url\nis valid.

", "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "description" : "The [media type](https://en.wikipedia.org/wiki/Media_type)\nof the file. This gives information on the file format/type. For example, application/x-parquet.\n", "maxLength" : 100, "example" : null } }, "required" : [ "download_url", "valid_till" ], "example" : null } }, "required" : [ "created_at", "export_date", "status", "table" ], "example" : null }, "Gateway" : { "type" : "string", "deprecated" : true, "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "gocardless", "not_applicable" ], "example" : null }, "GatewayErrorDetail" : { "type" : "object", "description" : "", "properties" : { "request_id" : { "type" : "string", "deprecated" : false, "description" : "This is a unique identifier assigned by the payment gateway. It is used to track the request at the payment gateway\n", "maxLength" : 100, "example" : null }, "error_category" : { "type" : "string", "deprecated" : false, "description" : "This parameter categorizes the type of error that occurred for the request. It helps in understanding whether the error is due to API error, validation, processing, network issues, and more\n", "maxLength" : 100, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "A gateway-specific code that corresponds to the particular error encountered for the request. This code can be used for identifying the error in a standardized manner across the gateway's services\n", "maxLength" : 100, "example" : null }, "error_message" : { "type" : "string", "deprecated" : false, "description" : "A message provided by the gateway that describes the nature of the error encountered\n", "maxLength" : 65000, "example" : null }, "decline_code" : { "type" : "string", "deprecated" : false, "description" : "When a transaction is declined, this code is provided by the gateway to specify the reason for the decline\n", "maxLength" : 100, "example" : null }, "decline_message" : { "type" : "string", "deprecated" : false, "description" : "This message gives a descriptive explanation of the reason for the transaction's decline\n", "maxLength" : 65000, "example" : null }, "network_error_code" : { "type" : "string", "deprecated" : false, "description" : "This code represents errors that originate from the payment network (such as Visa, MasterCard, and more). It is different from the gateway error code and is specific to the network's error-handling system\n", "maxLength" : 100, "example" : null }, "network_error_message" : { "type" : "string", "deprecated" : false, "description" : "This the network related error message from the gateway, this is a detailed message provided by the payment network explaining the nature of the network error encountered\n", "maxLength" : 65000, "example" : null }, "error_field" : { "type" : "string", "deprecated" : false, "description" : "This parameter indicates which specific data field or attribute in the request caused the error\n", "maxLength" : 100, "example" : null }, "recommendation_code" : { "type" : "string", "deprecated" : false, "description" : "After an error has occurred, the gateway or payment network may provide a recommendation code. This code suggests a course of action or remedy that you can follow to resolve the issue\n", "maxLength" : 100, "example" : null }, "recommendation_message" : { "type" : "string", "deprecated" : false, "description" : "This message is intended to provide guidance or suggestions on action or remedy that you can follow to resolve the issue\n", "maxLength" : 65000, "example" : null }, "processor_error_code" : { "type" : "string", "deprecated" : false, "description" : "This code is provided by the payment processor (the entity that handles the transaction between the bank accounts and the payment networks) and indicates errors that occur at this stage of the payment process\n", "maxLength" : 100, "example" : null }, "processor_error_message" : { "type" : "string", "deprecated" : false, "description" : "This message describes the specific error that the payment processor encountered\n", "maxLength" : 65000, "example" : null }, "error_cause_id" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "processor_advice_code" : { "type" : "string", "deprecated" : false, "description" : "

An advice code from the payment gateway or network that indicates how to handle a card decline. For example, the value try_again_later means you can retry the transaction.

", "maxLength" : 100, "example" : null } }, "example" : null }, "GatewayName" : { "type" : "string", "deprecated" : false, "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "GatewayPaymentMethodToken" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "gateway_name" : { "type" : "string", "deprecated" : false, "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "gateway_customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 128, "example" : null }, "gateway_token" : { "type" : "string", "deprecated" : false, "maxLength" : 256, "example" : null }, "status" : { "type" : "string", "default" : "active", "deprecated" : false, "enum" : [ "active", "inactive", "pending_verification" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "gateway_account_id", "gateway_name", "gateway_token", "id", "status" ], "example" : null }, "Gift" : { "type" : "object", "description" : "Gift represents a subscription of a customer(**recipient** ) to a 'gift plan' which has been gifted by another customer(**gifter**). It may also have addons and coupons. Gift will be created only on immediate successful payment collection from the gifter's payment method.\n\nGift is initially created in '**scheduled** ' state. The gift can be scheduled to be notified on a particular date to the recipient by passing 'scheduled_at'. If not, the recipient is notified immediately. Gift will be moved to '**unclaimed** ' state on the date of notification. If you pass auto_claim as true, gift status will be moved to '**claimed**' immediately, otherwise, the gift will remain 'unclaimed' till the recipient claims the gift.\n\nIf the gift is not claimed before the claim_expiry_date, it will be moved to the '**expired**' state.\n\n#### GIFT SUBSCRIPTION\n\nGift subscriptions will be created in '**future** ' state. Once the gift is claimed, the subscription will be moved to '**non-renewing**' state.\n\n#### INVOICE\n\nGift subscriptions will be invoiced immediately. The invoice created has **is_gifted** as 'true' and **term_finalized** as 'false'. This is because initially the invoice term_start and term_end are set as the subscription's start_date till the end of the plan period. Once the gift is claimed, the invoice's term_finalized will be marked as 'true'. The term_start will be changed to the actual invoice's term, which is the gift-claim date and the term_end will be changed till plan's period.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a gift\n", "maxLength" : 150, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Status of the gift.\n\\* claimed -\n\nGift is claimed.\n\\* cancelled -\n\nGift is cancelled.\n\\* unclaimed -\n\nGift is not yet claimed and is ready to be claimed.\n\\* scheduled -\n\nGift has been scheduled.\n\\* expired -\n\nGift is expired.\n", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "example" : null }, "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately.\n", "example" : null }, "auto_claim" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

When true\n, the claim happens automatically. When not passed, the default value in the site settings is used.

", "example" : null }, "no_expiry" : { "type" : "boolean", "deprecated" : false, "description" : "

When true\n, indicates that the gift does not expire. Do not pass or pass as false\nwhen auto_claim\nis set.

", "example" : null }, "claim_expiry_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date until which the gift can be claimed. Must be set to a value after scheduled_at.\nIf the gift is not claimed within claim_expiry_date\n, it will expire and the subscription will move to cancelled\nstate. When not passed, the value specified in the site settings will be used.\nPass as NULL\nor do not pass when auto_claim\nor no_expiry\nare set.

", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this gift resource was last updated.\n", "example" : null }, "gifter" : { "type" : "object", "deprecated" : false, "description" : "Gifter details\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Gifter customer id.\n", "maxLength" : 50, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "Invoice raised on the gifter.\n", "maxLength" : 50, "example" : null }, "signature" : { "type" : "string", "deprecated" : false, "description" : "Gifter sign-off name\n", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "Personalized message for the gift.\n", "maxLength" : 500, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "gift_receiver" : { "type" : "object", "deprecated" : false, "description" : "Receiver details\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Receiver customer id.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Subscription created for the gift.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the receiver as given by the gifter.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the receiver as given by the gifter,\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the receiver. All gift related emails are sent to this email.\n", "maxLength" : 70, "example" : null } }, "required" : [ "customer_id", "subscription_id" ], "example" : null }, "gift_timelines" : { "type" : "array", "deprecated" : false, "description" : "Gift timeline details\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "status" : { "type" : "string", "deprecated" : false, "description" : "Status of the gift.\n\\* cancelled -\n\nGift is cancelled.\n\\* expired -\n\nGift is expired.\n\\* scheduled -\n\nGift has been scheduled.\n\\* claimed -\n\nGift is claimed.\n\\* unclaimed -\n\nGift is not yet claimed and is ready to be claimed.\n", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "example" : null }, "occurred_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this event occurred.\n", "example" : null } }, "required" : [ "status" ], "example" : null }, "example" : null } }, "required" : [ "auto_claim", "gift_receiver", "gifter", "id", "no_expiry", "status" ], "example" : null }, "GiftCancelledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift" } }, "required" : [ "gift" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "GiftClaimedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift" } }, "required" : [ "gift" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "GiftExpiredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift" } }, "required" : [ "gift" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "GiftScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift" } }, "required" : [ "gift" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "GiftUnclaimedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift" } }, "required" : [ "gift" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "GiftUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift" } }, "required" : [ "gift" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "GrantBlock" : { "type" : "object", "description" : "

A grant block represents a bucket of issued credit grants associated with a given subscription, unit_id, and unit_type, allocated either through an item price or via the allocate operation.

Each grant block follows its own lifecycle, governed by a defined policy that manages how the credit grants within the block are consumed, held, expired or rolled over.

Example

An annual subscription plan grants 100 AI credits every month, resulting in a new grant block of 100 credit grants being allocated to the subscription at the start of each grant cycle.

During its lifecycle, the block tracks usage through fields such as used_amount, hold_amount, and the balance.

Since the grant frequency is monthly, each block has a validity of one month from its effective_from time, after which it expires. If a rollover policy is configured, any unused credit grants at expires_at may be carried forward into a new grant block; otherwise, they expire.

This process repeats each month as long as the subscription remains active, creating a sequence of time-bound grant blocks that independently track and manage their respective credit grants.

Grant Blocks Lifecycle

screenshot|/images/grant_blocks_lifecycle.png

Lifecycle Of Credit Grants In A Block

screenshot|/images/life_cycle_of_credits.png
", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for this grant block. \n**Behavior**\n\n* Automatically assigned by the ledger at creation time.\n* Immutable and cannot be modified once written.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription this grant block belongs to.\n", "maxLength" : 50, "example" : null }, "account_type" : { "type" : "string", "deprecated" : false, "description" : "The account this block belongs to: **provisioned** (credit grants issued per the plan, consumed first) or\n**overdraft** (consumption beyond the configured credit grants, after the provisioned account is exhausted).\n\\* provisioned -\n\nStores the credit grants given as per the plan configuration. Consumption of credit grants is first done\nthrough this account.\n\\* overdraft -\n\nAllows consumption beyond the configured credit grants. Used once the credit grants in the provisioned account\nare exhausted.\n", "enum" : [ "provisioned", "overdraft" ], "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit this block belongs to. For example, a credit unit id such as ai_credits.

", "maxLength" : 50, "example" : null }, "unit_type" : { "type" : "string", "deprecated" : false, "description" : "

Type of unit used for this balance. For example, credit_unit for credit grants.

\n* credit_unit -

The unit represents a credit unit, the type used by credit grants.

", "enum" : [ "credit_unit" ], "example" : null }, "granted_amount" : { "type" : "string", "deprecated" : false, "description" : "

The total number of credit grants issued to the grant block when it is created. This value represents the maximum credits the block can provide over its lifetime.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "effective_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when this grant block becomes active and its credits become available for use. \n**Behavior**\n\n* Allocations scheduled for the future are valid but remain non-spendable until this time.\n* Prior to this timestamp, the block is in a scheduled state. \n**Activation**\n\nAt effective_from, the block becomes active and its credits are included in the usable balance of the account. \n**Note**\n\neffective_from is inclusive (bounded). Any capture operation with a timestamp exactly equal to effective_from is eligible to consume credits from this block.\n", "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when this grant block stops being directly consumable. \n**Behavior**\n\n* At expires_at, the block transitions from available to in_grace_period.\n* During the grace period, eligible late-arriving operations may still consume credits based on their operation_timestamp. \n**Finalization**\nAfter the grace period ends, any remaining balance is finalized as expired or rolled over, depending on the configured rollover policy. \n**Note**\n\nexpires_at is exclusive (unbounded). Any capture operation with a timestamp exactly equal to expires_at is not eligible to consume credits from this block.\n", "example" : null }, "balance" : { "type" : "string", "deprecated" : false, "description" : "

Represents the remaining usable credits within this grant block, i.e., the portion of this specific block that is still available for consumption.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "hold_amount" : { "type" : "string", "deprecated" : false, "description" : "

Represents the portion of credit grants temporarily reserved by active authorization operations on this block, which are not yet captured or released.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Behavior\nThese reserved credits are not considered consumed. However, they are excluded from the remaining usable balance until the authorization is either completed (captured) or canceled (released).

\n

Example

If a block has 100 credits, with 20 used and 5 on hold, the balance is 75 and hold_amount is 5.

", "maxLength" : 36, "example" : null }, "used_amount" : { "type" : "string", "deprecated" : false, "description" : "

Represents the total credits consumed from this block through consumption operations, specifically debits resulting from capture and capture_authorization.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "expired_amount" : { "type" : "string", "deprecated" : false, "description" : "

Represents the portion of credit grants in this block that expired without being consumed, rolled over, or voided.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Lifecycle Behavior

\n

Finalization

Once the grace period ends, any remaining unconsumed credits are finalized and recorded as expired_amount.

\n

Example

If a block expires at 10:00 and has a 6-hour grace period, a usage event with an operation_timestamp of 9:55 can still consume credits during the grace window.

", "maxLength" : 36, "example" : null }, "rolled_over_amount" : { "type" : "string", "deprecated" : false, "description" : "

Represents the portion of credits carried forward from this block into a new rollover block during end-of-period processing.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Source vs Destination Behavior

\n

Reporting Semantics

Tracked separately from expired_amount to clearly distinguish credits that were preserved via rollover from those that expired.

", "maxLength" : 36, "example" : null }, "voided_amount" : { "type" : "string", "deprecated" : false, "description" : "

Represents the portion of credits removed from this block through administrative void operations.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Behavior

\n

Reporting Semantics

Tracked separately to ensure usage reports and revenue reconciliation exclude voided credits while maintaining a complete audit trail.

\n

Example

If 10 credits are revoked due to a cancellation, they are added to voided_amount and not counted as usage.

", "maxLength" : 36, "example" : null }, "origin_grant_block_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the source (originating) grant block from which this block was derived. \n**Behavior**\n\n* Populated only when this block is created through a rollover.\n* References the block whose remaining balance was carried forward into this block. \n**Usage**\n\nEnables traceability between original and rollover blocks for audit and reporting purposes.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "available", "deprecated" : false, "description" : "

Enumerated string representing the current lifecycle state of the grant block.

\n

Example

A block moves from scheduled → available → in_grace_period → exhausted over its lifecycle.

\n* available -

The block is effective and credit grants are consumable subject to remaining balance and holds.

\n* exhausted -

No usable credit grants remain; the block was fully consumed, expired, voided, or rolled over.

\n* in_grace_period -

Past expires_at but within the configured grace period; limited consumption is still allowed for eligible\noperations (those whose operation_timestamp falls within the original validity window).

\n* scheduled -

The block exists but effective_from is still in the future, so credit grants are not yet spendable.

", "enum" : [ "available", "exhausted", "scheduled", "in_grace_period" ], "example" : null }, "grant_source" : { "type" : "string", "deprecated" : false, "description" : "Enumerated string indicating the event or action that resulted in these credit grants being issued.\n\\* promotional_grants -\n\nIssued from the [allocate](/docs/api/ledger_operations/allocate) operation (for example, marketing offers or goodwill credits).\n\\* rollover -\n\nIssued by carrying forward unused credit grants from another block at end-of-period processing.\n\\* subscription_changed -\n\nIssued in response to a subscription change that triggers a new allocation (for example, a plan or addon\nupdate that adjusts the credit grants).\n\\* subscription_created -\n\nIssued when the subscription was created (initial allocation as per the plan configuration).\n\\* top_up -\n\nIssued from a top-up purchase or similar add-on credit-grant purchase made on top of the configured plan.\n", "enum" : [ "subscription_created", "subscription_changed", "top_up", "promotional_grants", "rollover", "grant_renewal", "subscription_renewed" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when this grant block was recorded in the ledger. \n**Behavior**\n\n* Automatically set by the ledger at creation time.\n* Immutable and cannot be modified after being written. \n**Usage**\n\nProvides a reliable reference for auditability and chronological ordering of grant blocks.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (seconds) when the grant block was last updated.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version is updated with a new timestamp for every change made to the resource.

", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Optional opaque JSON object carrying additional business context \\*\\*Behavior\\*\\* \\* Stored as-is and returned verbatim by the ledger. \\* Not interpreted, validated, or indexed by the ledger.\n", "example" : null } }, "required" : [ "balance", "created_at", "effective_from", "expired_amount", "expires_at", "grant_source", "granted_amount", "hold_amount", "id", "modified_at", "rolled_over_amount", "status", "used_amount", "voided_amount" ], "example" : null }, "GrantBlocksCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "grant_blocks" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/GrantBlock" }, "example" : null } }, "required" : [ "grant_blocks" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "GrantBlocksUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "grant_blocks" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/GrantBlock" }, "example" : null } }, "required" : [ "grant_blocks" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "GrantConfiguration" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_type" : { "type" : "string", "deprecated" : false, "enum" : [ "feature", "custom_pricing_unit" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan_price", "addon", "addon_price", "charge", "charge_price" ], "example" : null }, "version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "change_reason" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "is_latest" : { "type" : "boolean", "deprecated" : false, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "created_by" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "updated_by" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "entity_id", "id", "unit_id" ], "example" : null }, "GrantConfigurationOverride" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_type" : { "type" : "string", "deprecated" : false, "enum" : [ "feature", "custom_pricing_unit" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan_price", "addon", "addon_price", "charge", "charge_price" ], "example" : null }, "is_enabled" : { "type" : "boolean", "deprecated" : false, "example" : null }, "grant_policies" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "trigger_type" : { "type" : "string", "deprecated" : false, "enum" : [ "interval", "one_time" ], "example" : null }, "trigger_value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "trigger_period_unit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "month", "year" ], "example" : null }, "rollover_type" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "none", "unlimited", "time_limited", "capped" ], "example" : null }, "rollover_cap_value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "rollover_cap_type" : { "type" : "string", "deprecated" : false, "enum" : [ "percentage", "absolute" ], "example" : null }, "expiration_type" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "none", "interval" ], "example" : null }, "expiration_value" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "expiration_period_unit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "month", "year" ], "example" : null } }, "required" : [ "amount", "expiration_type", "id", "rollover_type", "trigger_type" ], "example" : null }, "example" : null }, "effective_from" : { "type" : "object", "deprecated" : false, "properties" : { "type" : { "type" : "string", "deprecated" : false, "enum" : [ "timestamp", "event" ], "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, "example" : null } }, "required" : [ "entity_id", "entity_type", "id", "is_enabled", "subscription_id", "unit_id", "unit_type" ], "example" : null }, "GrantConfigurationVersion" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_type" : { "type" : "string", "deprecated" : false, "enum" : [ "feature", "custom_pricing_unit" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan_price", "addon", "addon_price", "charge", "charge_price" ], "example" : null }, "change_reason" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "is_latest" : { "type" : "boolean", "deprecated" : false, "example" : null }, "created_by" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "updated_by" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "updated_at" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "grant_policies" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "trigger_type" : { "type" : "string", "deprecated" : false, "enum" : [ "interval", "one_time" ], "example" : null }, "trigger_value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "trigger_period_unit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "month", "year" ], "example" : null }, "rollover_type" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "none", "unlimited", "time_limited", "capped" ], "example" : null }, "rollover_cap_value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "rollover_cap_type" : { "type" : "string", "deprecated" : false, "enum" : [ "percentage", "absolute" ], "example" : null }, "expiration_type" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "none", "interval" ], "example" : null }, "expiration_value" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "expiration_period_unit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "month", "year" ], "example" : null } }, "required" : [ "amount", "expiration_type", "id", "rollover_type", "trigger_type" ], "example" : null }, "example" : null } }, "required" : [ "entity_id", "id", "unit_id" ], "example" : null }, "Hierarchy" : { "type" : "object", "description" : "

When a customer belongs to an account hierarchy, the hierarchy resource represents the customer's position within that hierarchy. The hierarchy provides details about the customer's parent, children, invoice owner, and payment owner.

Note

Related Endpoints

", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer associated with this hierarchy\nresource.

", "maxLength" : 50, "example" : null }, "parent_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the immediate parent for the customer identified by customer_id.\nIf the customer is the root of the hierarchy, this attribute isn't returned.

", "maxLength" : 50, "example" : null }, "payment_owner_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer responsible for paying the invoices for the customer identified by customer_id.\nThis ID must match either customer_id\nor invoice_owner_id\n.

", "maxLength" : 50, "example" : null }, "invoice_owner_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer who receives the invoice for charges incurred by the customer identified by customer_id.\nThis ID must match either customer_id\nor one of its ancestors.

", "maxLength" : 50, "example" : null }, "has_children" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the customer has child accounts in the hierarchy.\n", "example" : null }, "children_ids" : { "type" : "array", "deprecated" : false, "description" : "

A list of id\ns representing the immediate children, if any exist, for the customer identified by customer_id\n.

", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "customer_id", "invoice_owner_id", "payment_owner_id" ], "example" : null }, "HierarchyCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "HierarchyDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "HierarchyOperationType" : { "type" : "string", "deprecated" : false, "enum" : [ "complete_hierarchy", "subordinates", "path_to_root" ], "example" : null }, "HostedPage" : { "type" : "object", "description" : "

Hosted pages are the easiest way to integrate Chargebee with your website. For card payment methods, they help meet most of your PCI DSS compliance requirements. Chargebee offers hosted pages where your customers can perform the following actions:

Embedding a hosted page

Only the Checkout hosted page with the full-page layout supports embedding. To embed checkout in your website or application, use embedded checkout with Chargebee.js to mount checkout in a container on your page. Do not place hosted page URLs in your own iframe elements—Chargebee.js creates and manages the iframe for you.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier generated for each hosted page requested.\n", "maxLength" : 70, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Type of the requested hosted page.\n\\* accept_quote -\n\nAccept quote via hosted page\n\\* collect_now -\n\nCollect Unpaid Invoices for a Customer\n\\* checkout_new -\n\nCheckout new Subscription\n\\* extend_subscription -\n\nTo extend a Subscription period\n\\* checkout_one_time -\n\nCheckout one time\n\\* view_voucher -\n\nView Details of a voucher\n\\* pre_cancel -\n\nThis hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n\\* manage_payment_sources -\n\nManage Payments for a customer\n\\* checkout_existing -\n\nCheckout existing Subscription\n", "enum" : [ "checkout_new", "checkout_existing", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ], "example" : null }, "url" : { "type" : "string", "deprecated" : false, "description" : "Unique URL for the hosted page that will be included in your website.\n", "maxLength" : 250, "example" : null }, "state" : { "type" : "string", "default" : "created", "deprecated" : false, "description" : "Indicating the current state of the hosted page resource.\n\\* acknowledged -\n\nIndicates the succeeded hosted page is acknowledged.\n\\* created -\n\nIndicates the hosted page is just created.\n\\* requested -\n\nIndicates the hosted page is requested by the website\n\\* cancelled -\n\nIndicates the page is cancelled by the end user after requesting it.\n\\* succeeded -\n\nIndicates the hosted page is successfully submitted by the user and response is sent to the return url.\n", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "example" : null }, "pass_thru_content" : { "type" : "string", "deprecated" : false, "description" : "

This attribute allows you to store custom information with the hosted_page object. You can use it to associate specific data with a hosted page session.\nFor example, you can store the ID of the marketing campaign that initiated the user session. After a successful checkout, when the customer is redirected, you can retrieve the hosted page ID from the redirect URL's query parameters. Using this ID, you can fetch the hosted page and perform actions related to the success of the marketing campaign.

", "maxLength" : 2048, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this hosted page url is generated.\n", "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date and time when the hosted page URL expires. After this timestamp, the page can no longer be accessed.

\n

The expiration period depends on the type of hosted page:

\n", "example" : null }, "layout" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the UI layout for the hosted page.

\n

Applicable only when type is checkout_new, checkout_existing, checkout_one_time, or manage_payment_sources.

\n* in_app -

The hosted page is rendered in the in-app layout.

\n* full_page -

The hosted page is rendered in the full-page layout.

", "enum" : [ "in_app", "full_page" ], "example" : null }, "content" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "This attribute will be returned only during retrieve hosted page API call and also the retrieved hosted page resource state should be either in \"succeeded\" or \"cancelled\" state. If hosted page state is \"succeeded\", then the subscription, customer, card \\\\\\& invoice(optional) resources during checkout can be obtained. If hosted page is state is \"cancelled\", then it will be empty i.e no information about checkout.\n", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this hosted page was last updated.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "checkout_info" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Customer Info (email, first name and last name) given in the checkout page used for tracking abandoned carts. \\[Learn more\\](https://www.chargebee.com/docs/abandoned-carts.html)\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nof this hosted_page.

\n", "maxLength" : 50, "example" : null } }, "required" : [ "content" ], "example" : null }, "ImpactedCustomer" : { "type" : "object", "properties" : { "action_type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "download" : { "type" : "object", "deprecated" : false, "properties" : { "download_url" : { "type" : "string", "deprecated" : false, "maxLength" : 3500, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "download_url", "valid_till" ], "example" : null } }, "example" : null }, "ImpactedItem" : { "type" : "object", "description" : "Item entitlements can change due to certain events in Chargebee. The impacted_items represents the items whose entitlements have changed owing to an event. It is returned as part of the content attribute of the webhook triggered by the event. The following events can contain the impacted_items resource:\n\n* A feature is created, activated, or deleted.\n* An item_entitlement is updated or removed.\n* An entitlement_override is auto-removed.\n\n**Note**\n\nimpacted_items cannot be retrieved via API; the resource is sent to you only via webhooks.\n", "properties" : { "count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The total number of items that have been impacted.\n", "example" : null }, "items" : { "type" : "array", "deprecated" : false, "description" : "

The list of items that have been impacted. The objects in this array have the following keys:

\n\n

This list can contain a maximum of 1,000 items. The full list of items is available in download.

", "items" : { "example" : null }, "example" : null }, "download" : { "type" : "object", "deprecated" : false, "description" : "

The download\nresource containing all the impacted items. The list of items is available as a JSON array in the file at download.url\nuntil download.valid_till\n.

", "properties" : { "download_url" : { "type" : "string", "deprecated" : false, "description" : "The URL at which the file is available for download.\n", "maxLength" : 3500, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time until which the download_url\nis valid.

", "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "description" : "The [media type](https://en.wikipedia.org/wiki/Media_type)\nof the file.\n", "maxLength" : 100, "example" : null } }, "required" : [ "download_url", "valid_till" ], "example" : null } }, "example" : null }, "ImpactedItemPrice" : { "type" : "object", "properties" : { "count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "item_prices" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null }, "download" : { "type" : "object", "deprecated" : false, "properties" : { "download_url" : { "type" : "string", "deprecated" : false, "maxLength" : 3500, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "download_url", "valid_till" ], "example" : null } }, "example" : null }, "ImpactedSubscription" : { "type" : "object", "description" : "

When certain events in Chargebee cause changes to subscription entitlements, the impacted_subscriptions resource indicates the affected subscriptions. This resource is part of the content attribute of the triggered webhook for the following events:

Note

", "properties" : { "count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The total count of affected subscriptions.\n", "example" : null }, "subscription_ids" : { "type" : "array", "deprecated" : false, "description" : "

The impacted subscription IDs. This list contains up to 1,000 IDs. The complete list of subscription IDs is in the download\nresource, which can store up to 100,000 IDs.

", "items" : { "example" : null }, "example" : null }, "download" : { "type" : "object", "deprecated" : false, "description" : "

This download resource contains the impacted subscription IDs. These IDs are in a JSON array in the file at download.url until download.valid_till. The file at this URL stores up to 100,000 subscription IDs. Contact Support to increase this limit for your Chargebee site.

", "properties" : { "download_url" : { "type" : "string", "deprecated" : false, "description" : "The download URL for the file.\n", "maxLength" : 3500, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The expiration time for the download_url\n.

", "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "description" : "The [media type](https://en.wikipedia.org/wiki/Media_type)\nof the file.\n", "maxLength" : 100, "example" : null } }, "required" : [ "download_url", "valid_till" ], "example" : null } }, "example" : null }, "InAppSubscription" : { "type" : "object", "description" : "**Important:**\n\n* We've stopped giving access to the legacy solution due to the limitations mentioned [here](https://www.chargebee.com/docs/billing/2.0/mobile-subscriptions/mobile-subscriptions-limitations). Please [request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/omnichannel-subscription&ref=feature) for enabling the new [Omnichannel Subscriptions](/docs/api/recorded_purchases/recorded-purchase-object) solution.\n* These APIs operate asynchronously. When you receive a successful response code from an API call, it indicates only the successful submission of your request, not the completion of the operation.\n\nUsing In-app Subscriptions, you can track subscriptions you sell and service via in-app purchase channels such as Apple's App Store and Google's Play Store. Call [this API](/docs/api/in_app_subscriptions/process-purchase-command) to notify Chargebee of new subscription purchases. Chargebee responds by creating corresponding subscriptions. You can make the API call directly from the client-side application or from your server. In the case of the Apple App Store and Google Play Store integration, you can also configure Chargebee to receive server notifications from [Apple](https://developer.apple.com/documentation/appstoreservernotifications) and [Google](https://developer.android.com/google/play/billing/rtdn-reference#sub) to keep subscriptions up-to-date. \n**Note:**\n\nAfter creating a subscription in Chargebee using the [process purchase command](/docs/api/in_app_subscriptions/process-purchase-command) API, Chargebee manages it in real-time using notification events from [Apple](/docs/api/in_app_purchase_events) or [Google](/docs/api/in_app_purchase_events). To enable these notifications, generate a notification URL using these links - [Apple](https://www.chargebee.com/docs/2.0/mobile-app-store-product-iap.html#connection-keys_notification-url) and [Google](https://www.chargebee.com/docs/2.0/mobile-playstore-notifications.html) and configure it in their respective stores. \n**In-app subscriptions are read-only**\n\nThe subscriptions created via the [Process Purchase Command API](/docs/api/in_app_subscriptions/process-purchase-command) are managed by Apple or Google in response to actions taken by your subscribers via their respective accounts. Chargebee only keeps track of these subscriptions: creating and modifying them in response to events happening against the original subscriptions. Consequently, these subscriptions cannot be modified by you via the Chargebee admin console or the [Subscriptions API](/docs/api/subscriptions).\n", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the subscription\nfor which the receipt was sent.

", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer\nobject to which the subscription belongs.

", "maxLength" : 100, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "

The\nid\nof the plan-item price of the subscription.

", "maxLength" : 100, "example" : null }, "store_status" : { "type" : "string", "deprecated" : false, "description" : "The status of the subscription for the store\n\\* paused -\n\nWhen the subscription is paused.\n\\* in_trial -\n\nWhen the subscription is in trial.\n\\* active -\n\nWhen the subscription is active.\n\\* cancelled -\n\nWhen the subscription is cancelled.\n", "enum" : [ "in_trial", "active", "cancelled", "paused" ], "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the invoice generated in Chargebee

", "maxLength" : 100, "example" : null } }, "required" : [ "subscription_id" ], "example" : null }, "Invoice" : { "type" : "object", "additionalProperties" : true, "description" : "

An invoice is a commercial document representing a sale of products/services offered by you to a customer. It enumerates all the charges, adjustments, payments, discounts and taxes associated with the sale.

An invoice is said to be a recurring one when it is has at least one charge for a plan or an addon item price. It is a non-recurring one when it has charges for only charge-item prices or one-time charges.

The item prices for any given billing term of a subscription are billed via an invoice at the beginning of the term (unless the charges are left unbilled). However, item prices that belong to metered items are billed at the end of the term via a pending invoice that can close automatically or via an API call. Moreover, when there are no metered items in the subscription, the invoices can still be generated as pending while creating or updating a subscription.

Auto-collection

If auto-collection is enabled, then immediately on invoice generation (or, in case of subscriptions that have create_pending_invoices as true, on invoice closure), the payment method on file is charged:

Note: If consolidated invoicing is enabled, the attribute subscription_id is unavailable when the invoice has line items from multiple subscriptions. The individual subscription ids are seen under line_items.subscription_id.

Recurring and non-recurring invoices

A recurring invoice contains at least one line item that is billed on a recurring basis. Specifically, it has at least one line_items[] with entity_type set to plan_item_price or addon_item_price. A non-recurring invoice contains no recurring line items.

Refundable amount for an invoice

The refundable amount for an invoice is the (amount paid on the invoice + refundable credit applied on the invoice + taxes withheld on the invoice) minus (amount issued as refundable credit notes from the invoice). Each of these amounts is obtained from the invoice resource as follows:

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The invoice number. Acts as a identifier for invoice and typically generated sequentially.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the customer this invoice belongs to.\n", "maxLength" : 50, "example" : null }, "payment_owner" : { "type" : "string", "deprecated" : false, "description" : "Payment owner of an invoice\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the subscription this invoice belongs to.\nNote:\nWhen consolidated invoicing is enabled, you have to refer to line_item`s\nsubscription_id\nto identify the subscriptions associated with this invoice. However, it is important to avoid using this attribute if the invoice includes charges from multiple subscriptions, as it will be null in such cases.

", "maxLength" : 50, "example" : null }, "recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Boolean indicating whether this invoice belongs to a subscription\n", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Current status of this invoice.

\n* paid -

Indicates a paid invoice.

\n* posted -

Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period

\n* pending -

The invoice 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_invoicesattribute is set to true.\nThe invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.

\n* payment_due -

Indicates the payment is not yet collected and is being retried as per retry settings.

\n* not_paid -

Indicates the payment is not made and all attempts to collect is failed.

\n* voided -

Indicates a voided invoice.

", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The document date displayed on the invoice PDF. By default, it has the same value as the effective date of the action that created the invoice (subscription creation, update, or invoice creation). This date can be backdated (set to a value in the past) while performing the actions. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription or non-recurring charge is effective as of a past date. However, if the invoice is created as pending\n, 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.

", "example" : null }, "due_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Due date of the invoice\n", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

The number of days from invoice.date until payment for the invoice is due.

", "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice\n", "maxLength" : 100, "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "VAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number)\n", "maxLength" : 20, "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of the invoice.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "exchange_rate" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Exchange rate used for base currency conversion.Note that when converting foreign currency invoices to local currency for VAT purposes, the exchange rates used differ from the base currency exchange rate provided in this field. This is due to regulations set by tax authorities, which require the use of official sources such as European Central Bank rates for local currency conversion.\n", "maximum" : 1000000000, "minimum" : 0.0000000010, "example" : null }, "local_currency_exchange_rate" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "This parameter represents the exchange rate as a relative price of the base currency that appears as local currency in invoices and credit notes. The local currency exchange rate specifically refers to the exchange rate of a country's currency when converting it to another currency.\n\nFor example, if you want to convert US dollars to euros, the local currency exchange rate would be the rate at which you can convert US dollars to euros.\n", "maximum" : 1000000000, "minimum" : 0.0000000010, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the invoice\n", "maxLength" : 3, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed.\n", "maxLength" : 3, "example" : null }, "tax" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount for this invoice\n", "minimum" : 0, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The sum of all the line item amounts minus the sum of all line item discounts. In other words, this is the sum of all line_items[].amount

\n", "minimum" : 0, "example" : null }, "sub_total_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Invoice subtotal in the currency of the place of supply.\n", "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.\n", "minimum" : 0, "example" : null }, "total_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total invoice amount in the currency of the place of supply.\n", "minimum" : 0, "example" : null }, "amount_due" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The unpaid amount that is due on the invoice. This is calculated as: total

\n", "minimum" : 0, "example" : null }, "amount_adjusted" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Total adjustments made against this invoice.\n", "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Payments collected successfully for the invoice. This is the sum of linked_payments[].txn_amount\nfor all linked_payments[]\nthat have txn_status\nas success.

", "minimum" : 0, "example" : null }, "paid_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating the date \\& time this invoice got paid.\n", "example" : null }, "write_off_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Amount written off against this invoice.\n", "minimum" : 0, "example" : null }, "credits_applied" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Total credits applied against this invoice.\n", "minimum" : 0, "example" : null }, "dunning_status" : { "type" : "string", "deprecated" : false, "description" : "Current dunning status of the invoice.\n\\* exhausted -\n\nMaximum number of attempts have been made.\n\\* stopped -\n\nDunning has stopped for this invoice.\n\\* success -\n\nPayment successfully collected during dunning process.\n\\* in_progress -\n\nDunning is still in progress.\n", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "next_retry_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when will the next attempt to collect payment for this invoice occur.\n", "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating the date \\& time this invoice got voided.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this invoice was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.\n**Note** :\nThis value does not change when the following attributes are changed: *next_retry_at, dunning_status, has_advance_charges*\n", "example" : null }, "line_items_next_offset" : { "type" : "string", "deprecated" : false, "description" : "

This attribute is returned only if additional resources are available. Use this value as the input parameter for line_items_offset to retrieve the next set of resources.

\n

Note:

", "maxLength" : 1000, "example" : null }, "first_invoice" : { "type" : "boolean", "deprecated" : false, "description" : "Boolean indicating the first invoice raised for the subscription. In the case of a non-recurring invoice, it indicates the first invoice raised for the customer.\n", "example" : null }, "new_sales_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The share of the invoice total due to new sales. When first_invoice\nis true\n, this attribute is the same as total. However, when the invoice is a consolidated\none, then it is the sum of all line_items.amount\nbelonging to a new.

", "minimum" : 0, "example" : null }, "has_advance_charges" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether an [advance charge](https://www.chargebee.com/docs/billing/2.0/invoices-credit-notes-and-quotes/advance-invoices) is present in this invoice.\n", "example" : null }, "term_finalized" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Boolean indicating this invoice line_items terms are finalized or not.\n", "example" : null }, "is_gifted" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Boolean indicating this invoice is gifted or not.\n", "example" : null }, "generated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date when the invoice is finalized. This is the date in the invoice lifecycle when its status\nbecomes any one of the following for the first time: payment_due\n, posted\n, or paid.\nFor an invoice with status\nas pending\n, this happens when it gets closed.

", "example" : null }, "expected_payment_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date and time at which [dunning](https://www.chargebee.com/docs/payments/2.0/dunning-v2.html) should resume automatically for the invoice. This attribute is present only if dunning is currently [paused](/docs/api/invoices/pause-dunning-for-invoice) for the invoice.\n**See also** : [Dunning resumption process](/docs/api/invoices/resume-dunning-for-invoice).\n", "example" : null }, "amount_to_collect" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Payments that are yet to be collected for the invoice. This is determined as amount_due - the sum of all linked_payments[txn_amount][i] where linked_payments[txn_status][i] is in_progress.

", "minimum" : 0, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "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.\nIf there is no round-off amount\n, it will display 0\n.

", "minimum" : 0, "example" : null }, "void_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive\n", "maxLength" : 100, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates that this resource has been deleted.\n", "example" : null }, "tax_category" : { "type" : "string", "deprecated" : false, "description" : "Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.\n", "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \nIn-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\nfor more information.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the [business entity](/docs/api/advanced-features)\nof this invoice. Depending on whether the invoice was created directly for a customer or for a subscription, this is the business entity of the [customer](/docs/api/invoices/invoice-object#customer_id)\nor the [subscription](/docs/api/invoices/invoice-object#subscription_id)\nrespectively.\n", "maxLength" : 50, "example" : null }, "exchange_rates" : { "type" : "array", "deprecated" : false, "description" : "

List of exchange rates applied when converting invoice amounts to other currencies (such as VAT local currency and organization local currency). Each entry contains currency_code and rate.

\n

The invoice currency is the base currency. When multiple rates target the same currency, only one entry is returned.

\n

This array is different from exchange_rate in the response. An entry whose currency_code matches local_currency_code uses the same rate as local_currency_exchange_rate.

\n

This array is returned in the response only when the corresponding features are enabled.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "currency_code" : { "type" : "string", "deprecated" : false, "description" : "Target currency for the conversion (ISO 4217). The invoice currency is the base currency.\n", "maxLength" : 3, "example" : null }, "rate" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "

Exchange rate applied as: 1 currency_code = rate invoice currency.

\n

For example, when the invoice currency is USD, currency_code is INR, and rate is 0.010448403, then 1 INR = 0.010448403 USD.

", "maximum" : 1000000000, "minimum" : 0.0000000010, "example" : null } }, "required" : [ "currency_code", "rate" ], "example" : null }, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "The list of line items for this invoice\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this line item belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this line item.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this line item.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the line item.\n", "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "[Quantity of the recurring item](/docs/api/invoices/invoice-object#line_items_quantity) represented by this line item.\nFor metered line items, this value is updated from [usages](/docs/api/usages) when:\n\n* the invoice is generated as pending\n\n* the invoice is [closed](/docs/api/invoices/close-a-pending-invoice)\n\n* the sync usages API is called\n\n", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this line item. Typically equals to unit amount x quantity\n", "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models)\nfor this item price.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether this line item is taxed or not\n", "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The tax amount charged for this item\n", "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "Rate of tax used to calculate tax for this lineitem\n", "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this line\n", "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Line Item-level discounts for this line.\n", "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the line item is for a metered item. If true, the item is metered; otherwise, it is non-metered.

", "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the line item is percentage-based.\n", "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the invoice line item to which this credit note line item is related. This is the same as [invoice.line_items.id](/docs/api/invoices/invoice-object#line_items_id)\n.\n", "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "The name of this line item as displayed on the invoice. For catalog-backed line items, this is the item's invoice name. For adhoc one-time charges, this is the charge name provided at creation.\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "description" : "Descriptive text for this line item displayed on the invoice, shown below the line item name. For catalog-backed line items, this is the item price description when configured. Can be overridden when creating one-time invoices via the [Create invoice for items and one-time charges](/docs/api/invoices/create-invoice-for-items-and-one-time-charges) operation.\n", "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason due to which the line item price/amount is exempted from tax.

\n* tax_not_configured -

If tax is not enabled for the site

\n* tax_not_configured_external_provider -

If the tax is not configured for the country in 3rd party tax provider.

\n* customer_exempt -

If the Customer is marked as Tax exempt

\n* region_non_taxable -

If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction

\n* product_exempt -

If the Plan or Addon is marked as Tax exempt

\n* zero_value_item -

If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.

\n* reverse_charge -

If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only

\n* high_value_physical_goods -

If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied

\n* zero_rated -

If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item

\n* export -

You are not registered for tax in the customer's region. This is also the reason code when both billing_address\nand shipping_address\nhave not been provided for the customer and subscription respectively

", "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this line item belongs to\n", "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for this line item\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of deduction(s) applied for each line item of this invoice\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique id of the line item that this deduction is for.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice. The entity_id\nis null\nin this case.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id\nis available as entity_id\n.

\n* item_level_coupon -

The deduction is due to a coupon applied to a line item of the invoice. The coupon id\nis available as entity_id\n.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on line items\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period end of the tax rate for the line item.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period start of the tax rate for the line item.\n", "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Indicates the prorated line item amount in cents.\n", "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount\n", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* state -\n\nThe tax jurisdiction is a state\n\\* city -\n\nThe tax jurisdiction is a city\n\\* special -\n\nSpecial tax jurisdiction.\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* county -\n\nThe tax jurisdiction is a county\n\\* country -\n\nThe tax jurisdiction is a country\n\\* other -\n\nJurisdictions other than the ones listed above.\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "line_item_credits" : { "type" : "array", "deprecated" : false, "description" : "A list of store credits applied to line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the credit note from which the credit is applied.\n", "maxLength" : 50, "example" : null }, "applied_amount" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The credit amount applied to the line item.\n", "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the line item to which this credit is applied.\n", "maxLength" : 40, "example" : null } }, "required" : [ "applied_amount", "cn_id" ], "example" : null }, "example" : null }, "line_item_addresses" : { "type" : "array", "deprecated" : false, "description" : "The list of addresses used for tax calculation on line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Line item reference\n", "maxLength" : 40, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address of the customer\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Name of the company\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "Name of the city\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address of the customer, specified as an [ISO 3166 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html).\nEntering an invalid code will return an error. \nIf [EU VAT](https://www.chargebee.com/docs/eu-vat.html) (2021 or later) or [Brexit configuration](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) is enabled, 'United Kingdom-Northern Ireland' is a valid option.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of all deductions applied to the invoice.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this deduction.\n", "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id of the line item that this deduction is for. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of discount that is applied to the line item. Relevant only when discounts[entity_type]\nis one of item_level_discount\n, item_level_coupon\n, document_level_discount\n, or document_level_coupon

\n* percentage -

when percentage is applied as discount

\n* fixed_amount -

when amount is applied as discount

", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "description" : "

The coupon code\n, if applicable, used to provide the discount. The coupon.id\nis available in entity_id\n.

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied for this invoice\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied. E.g. GST.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the tax item.\n", "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null }, "tax_origin" : { "type" : "object", "deprecated" : false, "description" : "It represents information about the tax details that are applied to an invoice. Additionally, it specifies the country from which the tax is applied, as well as the relevant tax registration number.\n", "properties" : { "country" : { "type" : "string", "deprecated" : false, "description" : "The country code in ([ISO 3166-1 alpha-2 format](https://www.iso.org/iso-3166-country-codes.html)\n) where the tax originated from.\n", "maxLength" : 50, "example" : null }, "registration_number" : { "type" : "string", "deprecated" : false, "description" : "It represents the tax registration number for the entity used to collect tax.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "linked_taxes_withheld" : { "type" : "array", "deprecated" : false, "description" : "

Details of tax_withheld\nagainst this invoice.

\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

An auto-generated unique identifier for the tax withheld. The value starts with the prefix tax_wh_.\nFor example, tax_wh_16BdDXSlbu4uV1Ee6\n.

", "maxLength" : 40, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount withheld by the customer as tax from the invoice. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "The description for this tax withheld.\n", "maxLength" : 65000, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date or time associated with the tax withheld.\n", "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null } }, "required" : [ "id" ], "example" : null }, "example" : null }, "linked_payments" : { "type" : "array", "deprecated" : false, "description" : "The list of transactions for this invoice\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "txn_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the transaction.\n", "maxLength" : 40, "example" : null }, "applied_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The transaction amount applied to this invoice\n", "minimum" : 0, "example" : null }, "applied_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which the transaction is applied.\n", "example" : null }, "txn_status" : { "type" : "string", "deprecated" : false, "description" : "

The status of this transaction.

\n* timeout -

Transaction failed because of Gateway not accepting the connection.

\n* late_failure -

Indicates that a successful payment transaction has failed now due to a late failure notification from the payment gateway, typically caused by issues like insufficient funds or a closed bank account.

\n* failure -

Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure

\n* in_progress -

Transaction is being processed by the gateway. This typically happens for direct debit transactions\nor, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.

\n* success -

The transaction is successful.

\n* voided -

The transaction got voided or authorization expired at gateway.

\n* needs_attention -

When connection with the Gateway gets terminated abruptly. For needs_attention\nstatus Chargebee automatically reconcile the transaction for few gateways, for rest of the gateways you have to use the Reconcile transaction API.\nYou can use this API to update the id_at_gateway\n(Gateway Transaction ID) and status\nfor a needs_attention\ntransaction to be reconciled at par with the gateway.

\n

Learn more\nabout needs_attention\ntransaction status

", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "txn_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null }, "txn_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of the transaction\n", "minimum" : 0, "example" : null } }, "required" : [ "applied_amount", "applied_at", "txn_id" ], "example" : null }, "example" : null }, "reference_transactions" : { "type" : "array", "deprecated" : false, "description" : "A list of up to 20 transactions for this invoice. The list can contain authorizations and payments. Transactions are sorted by creation date in ascending order.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "applied_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount from the transaction that was applied to the invoice.\n", "minimum" : 0, "example" : null }, "applied_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the transaction was applied to the invoice, in seconds since the Unix epoch.\n", "example" : null }, "txn_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier for the transaction.\n", "maxLength" : 40, "example" : null }, "txn_status" : { "type" : "string", "deprecated" : false, "description" : "

The status of the transaction.

\n* timeout -

The transaction failed because the gateway did not accept the connection.

\n* success -

The transaction was successful.

\n* in_progress -

The transaction is being processed by the gateway. This typically occurs for direct debit transactions\nor, for cards, refund transactions. Processing can take 2-7 days, depending on the gateway and payment method.

\n* needs_attention -

The transaction could not be completed because the connection with the gateway was terminated unexpectedly. For some gateways, Chargebee automatically reconciles such transactions. For others, you must manually reconcile them by using the Reconcile transaction API.\nUse this API to update the id_at_gateway\n(gateway transaction ID) and status.

\n

Learn more\nabout needs_attention\ntransactions.

\n* late_failure -

A payment that was previously marked as successful has failed due to a late failure notification from the gateway. This can happen if the account had insufficient funds or was closed after the initial authorization.

\n* voided -

The transaction was voided, or the authorization expired at the gateway.

\n* failure -

The transaction failed. Refer to the error_code\nand error_text\nfields for details about the failure.

", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "txn_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the transaction occurred, in seconds since the Unix epoch.\n", "example" : null }, "txn_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total amount of the transaction.\n", "minimum" : 0, "example" : null }, "txn_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of transaction.

\n* authorization -

The transaction is an authorization to capture the amount\nfrom the customer's payment_source\n.

\n* refund -

The transaction is a refund that returns the amount\nto the customer's payment_source\n.

\n* payment -

The transaction is a payment that captures the amount\nfrom the customer's payment_source\n.

\n* payment_reversal -

The transaction is a reversal of a previously captured payment.

", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "example" : null }, "amount_capturable" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

This is the part of the authorized amount\nthat is yet to be captured. The payment capture is recorded as a transaction of type\n= payment.\nApplicable only for a transaction of type\n= authorization\n.

", "minimum" : 0, "example" : null }, "authorization_reason" : { "type" : "string", "deprecated" : false, "description" : "

Type of reason for the authorization transaction.

\n* verification -

The transaction was created to verify the payment method.

\n* blocking_funds -

The transaction was created to block funds from the payment method.

\n* scheduled_capture -

The transaction was authorized in advance for capture at a later time by a scheduled system job. The capture may succeed or fail, and its outcome is recorded as a linked transaction under linked_payments\n.

", "enum" : [ "verification", "blocking_funds", "scheduled_capture" ], "example" : null } }, "required" : [ "applied_amount", "applied_at", "txn_id", "txn_type" ], "example" : null }, "example" : null }, "dunning_attempts" : { "type" : "array", "deprecated" : false, "description" : "The list of dunning_attempts for this invoice\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "attempt" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Dunning attempt number.\n", "example" : null }, "transaction_id" : { "type" : "string", "deprecated" : false, "description" : "Transaction associated with attempt.\n", "maxLength" : 40, "example" : null }, "dunning_type" : { "type" : "string", "default" : "auto_collect", "deprecated" : false, "description" : "Types of dunning\n\\* offline -\n\nDunning type is offline.\n\\* direct_debit -\n\nDunning type is direct debit.\n\\* auto_collect -\n\nDunning type is auto collection.\n", "enum" : [ "auto_collect", "offline", "direct_debit", "real_time_payments" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which the attempt was made.\n", "example" : null }, "txn_status" : { "type" : "string", "deprecated" : false, "description" : "

The status of this transaction.

\n* success -

The transaction is successful.

\n* needs_attention -

When connection with the Gateway gets terminated abruptly. For needs_attention\nstatus Chargebee automatically reconcile the transaction for few gateways, for rest of the gateways you have to use the Reconcile transaction API.\nYou can use this API to update the id_at_gateway\n(Gateway Transaction ID) and status\nfor a needs_attention\ntransaction to be reconciled at par with the gateway.

\n

Learn more\nabout needs_attention\ntransaction status

\n* failure -

Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure

\n* voided -

The transaction got voided or authorization expired at gateway.

\n* in_progress -

Transaction is being processed by the gateway. This typically happens for direct debit transactions\nor, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.

\n* timeout -

Transaction failed because of Gateway not accepting the connection.

\n* late_failure -

Indicates that a successful payment transaction has failed now due to a late failure notification from the payment gateway, typically caused by issues like insufficient funds or a closed bank account.

", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "txn_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of the transaction\n", "minimum" : 0, "example" : null }, "retry_engine" : { "type" : "string", "default" : "chargebee", "deprecated" : false, "description" : "The payment retry system used for this dunning attempt.\n\\* chargebee -\n\nThe attempt was processed by Chargebee Recovery.\n\\* flexpay -\n\nThe attempt was processed by FlexPay Recovery.\n\\* successplus -\n\nGoCardless Success Plus.\n", "enum" : [ "chargebee", "flexpay", "successplus" ], "example" : null } }, "required" : [ "attempt", "dunning_type" ], "example" : null }, "example" : null }, "applied_credits" : { "type" : "array", "deprecated" : false, "description" : "Refundable Credits applied on this invoice.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "description" : "Credit applied on the credit note ID.\n", "maxLength" : 50, "example" : null }, "applied_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total credit amount applied to this invoice.\n", "minimum" : 0, "example" : null }, "applied_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the credit amount was applied to this invoice.\n", "example" : null }, "cn_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Credit note reason code. Deprecated; use the cn_create_reason_code parameter instead\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n\\* order_cancellation -\n\nOrder Cancellation\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n\\* chargeback -\n\nCan be set when you are recording your customer Chargebacks\n\\* subscription_cancellation -\n\nThis reason will be set automatically for Credit Notes created during cancel subscription operation\n\\* fraudulent -\n\nFRAUDULENT\n\\* subscription_pause -\n\nThis reason will be automatically set to credit notes created during pause/resume subscription operation.\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n\\* subscription_change -\n\nThis reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html)\nis enabled\n\\* write_off -\n\nThis reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off)\noperation.\n\\* order_change -\n\nOrder Change\n\\* waiver -\n\nWaiver\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "cn_create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Credit note reason code\n", "maxLength" : 100, "example" : null }, "cn_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the date at which this credit note is created\n", "example" : null }, "cn_status" : { "type" : "string", "deprecated" : false, "description" : "Credit note status.\n\\* voided -\n\nWhen the Credit Note has been cancelled.\n\\* adjusted -\n\nWhen the Credit Note has been adjusted against an invoice.\n\\* refund_due -\n\nWhen the credits are yet to be used, or have been partially used.\n\\* refunded -\n\nWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "tax_application" : { "type" : "string", "deprecated" : false, "description" : "Specifies how tax is handled for credits applied to this invoice.\n\\* pre_tax -\n\nCredits are applied before tax calculation.\n\\* post_tax -\n\nCredits are applied after tax calculation.\n", "enum" : [ "pre_tax", "post_tax" ], "example" : null } }, "required" : [ "applied_amount", "applied_at", "cn_id", "cn_status" ], "example" : null }, "example" : null }, "adjustment_credit_notes" : { "type" : "array", "deprecated" : false, "description" : "Adjustments created for this invoice\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "description" : "Credit-note id\n", "maxLength" : 50, "example" : null }, "cn_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Credit note reason code. Deprecated; use the cn_create_reason_code parameter instead\n\\* subscription_cancellation -\n\nThis reason will be set automatically for Credit Notes created during cancel subscription operation\n\\* waiver -\n\nWaiver\n\\* write_off -\n\nThis reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off)\noperation.\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n\\* fraudulent -\n\nFRAUDULENT\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n\\* order_change -\n\nOrder Change\n\\* subscription_change -\n\nThis reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html)\nis enabled\n\\* order_cancellation -\n\nOrder Cancellation\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n\\* chargeback -\n\nCan be set when you are recording your customer Chargebacks\n\\* subscription_pause -\n\nThis reason will be automatically set to credit notes created during pause/resume subscription operation.\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "cn_create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Credit note reason code\n", "maxLength" : 100, "example" : null }, "cn_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the date at which this credit note is created\n", "example" : null }, "cn_total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Total amount of the credit note.\n", "minimum" : 0, "example" : null }, "cn_status" : { "type" : "string", "deprecated" : false, "description" : "Credit note status.\n\\* refunded -\n\nWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n\\* voided -\n\nWhen the Credit Note has been cancelled.\n\\* refund_due -\n\nWhen the credits are yet to be used, or have been partially used.\n\\* adjusted -\n\nWhen the Credit Note has been adjusted against an invoice.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null } }, "required" : [ "cn_id", "cn_status" ], "example" : null }, "example" : null }, "issued_credit_notes" : { "type" : "array", "deprecated" : false, "description" : "Credit notes issued for this invoice\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "description" : "Credit-note id\n", "maxLength" : 50, "example" : null }, "cn_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Credit note reason code. Deprecated; use the cn_create_reason_code parameter instead\n\\* fraudulent -\n\nFRAUDULENT\n\\* chargeback -\n\nCan be set when you are recording your customer Chargebacks\n\\* subscription_pause -\n\nThis reason will be automatically set to credit notes created during pause/resume subscription operation.\n\\* order_change -\n\nOrder Change\n\\* subscription_change -\n\nThis reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html)\nis enabled\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n\\* write_off -\n\nThis reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off)\noperation.\n\\* subscription_cancellation -\n\nThis reason will be set automatically for Credit Notes created during cancel subscription operation\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n\\* waiver -\n\nWaiver\n\\* order_cancellation -\n\nOrder Cancellation\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "cn_create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Credit note reason code\n", "maxLength" : 100, "example" : null }, "cn_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the date at which this credit note is created\n", "example" : null }, "cn_total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Total amount of the credit note.\n", "minimum" : 0, "example" : null }, "cn_status" : { "type" : "string", "deprecated" : false, "description" : "Credit note status.\n\\* refund_due -\n\nWhen the credits are yet to be used, or have been partially used.\n\\* adjusted -\n\nWhen the Credit Note has been adjusted against an invoice.\n\\* voided -\n\nWhen the Credit Note has been cancelled.\n\\* refunded -\n\nWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null } }, "required" : [ "cn_id", "cn_status" ], "example" : null }, "example" : null }, "linked_orders" : { "type" : "array", "deprecated" : false, "description" : "The list of orders for this invoice\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the order. It is the api identifier for the order\n", "maxLength" : 40, "example" : null }, "document_number" : { "type" : "string", "deprecated" : false, "description" : "The order's serial number\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "new", "deprecated" : false, "description" : "The status of this order.\n\\* awaiting_shipment -\n\nThe order has been picked up by an integration system, and synced to a shipping management platform\n\\* queued -\n\nOrder is yet to be processed by any system, these are scheduled orders created by Chargebee\n\\* returned -\n\nThe order has been returned after delivery.\n\\* complete -\n\nOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n\\* processing -\n\nOrder is being processed. Applicable only if you are using Chargebee's legacy order management system\n\\* new -\n\nOrder has been created. Applicable only if you are using Chargebee's legacy order management system.\n\\* shipped -\n\nThe order has moved from order management system to a shipping system.\n\\* on_hold -\n\nThe order is paused from being processed.\n\\* cancelled -\n\nOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n\\* delivered -\n\nThe order has been delivered to the customer.\n\\* partially_delivered -\n\nThe order has been partially delivered to the customer.\n\\* voided -\n\nOrder has been voided. Applicable only if you are using Chargebee's legacy order management system\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "order_type" : { "type" : "string", "deprecated" : false, "description" : "Order type\n\\* system_generated -\n\nThe order has been created by Chargebee automatically based on the preferences set by the user.\n\\* manual -\n\nThe order has been created by the user using Chargebee's legacy order management system.\n", "enum" : [ "manual", "system_generated" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "fulfillment_status" : { "type" : "string", "deprecated" : false, "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", "maxLength" : 50, "example" : null }, "batch_id" : { "type" : "string", "deprecated" : false, "description" : "Unique id to identify a group of orders.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was created\n", "example" : null } }, "required" : [ "created_at", "id" ], "example" : null }, "example" : null }, "notes" : { "type" : "array", "deprecated" : false, "description" : "

The list of notes\nthat appear on the invoice PDF sent to the customer. Notes that come from a specific resource related to the invoice have entity_type\nand entity_id\ndefined. There can be up to two notes in this array for which entity_type\nand entity_id\nare not defined:

\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "note" : { "type" : "string", "deprecated" : false, "description" : "Actual note.\n", "maxLength" : 65000, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the entity.\n", "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Type of entity to which the note belongs.\n\\* subscription -\n\nEntity that represents a subscription of customer.\n\\* customer -\n\nEntity that represents a customer.\n\\* tax -\n\nThe note is configured as part of the [tax configuration](https://www.chargebee.com/docs/tax.html)\nin Chargebee Billing.\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* coupon -\n\nEntity that represents a coupon.\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n", "enum" : [ "coupon", "subscription", "customer", "plan_item_price", "addon_item_price", "charge_item_price", "tax" ], "example" : null } }, "required" : [ "note" ], "example" : null }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Shipping address for the invoice.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Billing address for the invoice.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Statement descriptor for the invoice.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a statement_descriptor\n", "maxLength" : 40, "example" : null }, "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment descriptor text\n", "maxLength" : 65000, "example" : null } }, "required" : [ "id" ], "example" : null }, "einvoice" : { "type" : "object", "deprecated" : false, "description" : "An e-invoice or electronic invoice is a structured representation of an invoice that is interoperable between computerized invoicing systems. Depending on the country, e-invoicing can be necessary to meet financial/taxation authority regulations.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id\nfor the e-invoice. This is auto-generated by Chargebee.

", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier returned by the connected e-invoicing provider for this submission (for example, a document submission id). Chargebee uses this value when communicating with the provider to retrieve submission status and related artifacts.\n", "maxLength" : 50, "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "This attribute is used to populate the unique reference number assigned to an invoice on the Invoice Registration Portal (IRP) network. It is essential for identifying and tracking invoices that are processed through the IRP network.\n\nIn the future, this field may be used to store similar reference numbers for other networks.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of processing the e-invoice. To obtain detailed information about the current status\n, see message\n.

\n* under_query -

The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.

\n* rejected -

The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.

\n* paid -

The receiving entity has confirmed that the e-invoice has been paid.

\n* skipped -

The e-invoice was not sent. This could be due to missing information or because the entity_identifier\nis not registered on the e-invoicing network.

\n* failed -

The e-invoice was sent and there was an error due to which it was not delivered.

\n* in_progress -

The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.

\n* message_acknowledgement -

An acknowledgment confirming that the application response was successfully received by the receiving entity.

\n* scheduled -

Sending the e-invoice to the customer has been scheduled.

\n* conditionally_accepted -

The e-invoice has been accepted with conditions.

\n* accepted -

The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.

\n* success -

The e-invoice has been successfully delivered to the customer.

\n* in_process -

The e-invoice is currently being processed by the receiving entity.

\n* 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", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "message" : { "type" : "string", "deprecated" : false, "description" : "

Detailed information about the status of the e-invoice. When status\nis skipped\nor failed\n, this contains the reason or error details. The following are some valid examples:

\n", "maxLength" : 3000, "example" : null }, "provider_references" : { "type" : "array", "deprecated" : false, "description" : "List of key-value pairs from the e-invoicing provider (e.g. Receipt Message ID).\n", "items" : { "example" : null }, "example" : null } }, "required" : [ "id", "status" ], "example" : null }, "site_details_at_creation" : { "type" : "object", "deprecated" : false, "description" : "It contains site-specific information, including timezone and organisational address.\n", "properties" : { "timezone" : { "type" : "string", "deprecated" : false, "description" : "It represents the timezone of the site at the time of entity creation.\n", "maxLength" : 50, "example" : null }, "organization_address" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

It represents the address configured for the site during entity creation. Includes currency_code (ISO 4217): the currency of the organisation address country at creation time.

", "example" : null } }, "example" : null } }, "required" : [ "currency_code", "customer_id", "deleted", "id", "is_gifted", "price_type", "recurring", "status", "sub_total", "tax", "term_finalized" ], "example" : null }, "InvoiceAction" : { "type" : "string", "deprecated" : false, "enum" : [ "void", "write_off" ], "example" : null }, "InvoiceDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "InvoiceDunningHandling" : { "type" : "string", "deprecated" : false, "enum" : [ "continue", "stop" ], "example" : null }, "InvoiceEstimate" : { "type" : "object", "properties" : { "recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "credits_applied" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "amount_due" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "line_item_credits" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "applied_amount" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null } }, "required" : [ "applied_amount", "cn_id" ], "example" : null }, "example" : null }, "line_item_addresses" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null } }, "required" : [ "currency_code", "price_type", "recurring", "sub_total" ], "example" : null }, "InvoiceGeneratedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "InvoiceGeneratedWithBackdatingEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "InvoiceUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Item" : { "type" : "object", "additionalProperties" : true, "description" : "

When offering subscriptions of products or services, each entity that is made available for sale is represented by an "item" object. Items therefore represent the various plans, addons or charges that you offer as part of your product catalog. Non-metered items are charged upfront in Chargebee, while metered items are charged at the end of the billing cycle, based on usage.

Types of Items

There are three types of items and they're listed and explained here. Examples for each type are provided in the table that follows.

Plan-items or Plans

Plan-items are items that have a recurring charge and are an essential component of any subscription. Typically, plans represent a principal or key product or service in your catalog. They are charged at recurring intervals and often have other products or services offered along with them as addons and charges.

Addon-items or Addons

Addon-items are items that are sold along with a plan and are charged for at recurring intervals.

Charge-items or Charges

Charge-items are items that are sold along with a plan but charged once (or each time) a specified event occurs. A charge can also be applied to a customer without attaching to a subscription.

Examples

To help understand each type of item better, listed below are some examples of items from different business domains:

Non-Metered (SaaS)
Non-Metered (E-commerce)
Metered
", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier for the item. It is unique and immutable.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the item. This is visible only in Chargebee and not to customers.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the item.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "

Description of the item. This is visible only in Chargebee and not to customers.

\n

Note:

", "maxLength" : 2000, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of the item.

\n* archived -

The item is no longer active and no new item prices can be created

\n* active -

The item can be used to create new item prices.

\n* deleted -

Indicates that the item has been deleted.\nThe id\nand name\ncan be reused. Deleted items can be retrieved using List items\n.

", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the item was last updated.\n", "example" : null }, "item_family_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the Item family\nthat the item belongs to. Is mandatory when Product Families\nhave been enabled.

", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The type of the item.\n\\* plan -\n\nAn 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.\n\\* charge -\n\nA 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](/docs/api/v2/pcv-1/invoices/create-invoice-for-a-one-time-charge)\nwithout being applied to a subscription.\n\\* addon -\n\nA recurring component that can be added to a subscription in addition to its plan.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "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.\n", "example" : null }, "is_giftable" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies if gift subscriptions can be created for this item.\n", "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "

If enabled_for_checkout\n, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.

", "maxLength" : 500, "example" : null }, "enabled_for_checkout" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Allow the plan to subscribed to via Checkout. Applies only for plan-items.\n**Note:**\nOnly the in-app layout of Checkout is supported.\n", "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : true, "deprecated" : 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).\nApplies 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)\n.\n", "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge\nand 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\n.

", "example" : null }, "item_applicability" : { "type" : "string", "default" : "all", "deprecated" : false, "description" : "

Indicates which addon-items and charge-items can be applied to the item. Only meant 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\nor Update an attached item\nAPI.

\n* all -

all addon-items and charge-items are applicable to this plan-item.

\n* restricted -

only the addon-items or charge-items provided in applicable_items\ncan be applied to this plan-item.

", "enum" : [ "all", "restricted" ], "example" : null }, "gift_claim_redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The URL to redirect to once the gift has been claimed by the receiver.\n", "maxLength" : 500, "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "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](/docs/api/hosted_pages)\n, [invoices](/docs/api/invoices)\nand [quotes](/docs/api/quotes).\nExamples follow:\n\n* \"user\" for a cloud-collaboration platform.\n* \"GB\" for a data service.\n* \"issue\" for a magazine.\n", "maxLength" : 30, "example" : null }, "metered" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

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.

", "example" : null }, "usage_calculation" : { "type" : "string", "deprecated" : false, "description" : "

How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered.\nThis value overrides the one set at the site level\n.

\n* sum_of_usages -

the net quantity is the sum of the quantity\nof all usages for the current term.

\n* last_usage -

from among the usage records for the item price\nwith usage_date\nwithin the relevant billing period, the quantity\nof the usage record with the most recent usage_date\nis taken as the net quantity consumed.

\n* max_usage -

from among the usage records for the item price\nwith usage_date\nwithin the relevant billing period, the quantity\nof the usage record with the maximum value is taken as the net quantity consumed.

", "enum" : [ "sum_of_usages", "last_usage", "max_usage" ], "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the pricing is percentage-based.\n", "example" : null }, "archived_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this item was archived.\n", "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \nIn-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\nfor more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the item. \\[Learn more\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the item has been deleted or not.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the [business entity](/docs/api/business_entities)\nof this item. This is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.\n", "maxLength" : 50, "example" : null }, "applicable_items" : { "type" : "array", "deprecated" : false, "description" : "

The list of addons and charges that are allowed to be applied to the plan. This attribute is applicable only for plan-items and that too when item_applicability\nis restricted\n.

\n

Other details of attaching items can be specified using the Create\nor Update an attached item\nAPI.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id of the addon-item or plan-item that can be applied to the plan-item.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null }, "bundle_items" : { "type" : "array", "deprecated" : false, "description" : "

The list of items(plans, addons, and charges) added to the bundle plan. This attribute is only available when the item_type\nis plan\n.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the item(plan, addon, or charge) associated with this bundle.\n**Note:**\nAt least one plan item must be associated with this bundle.\n", "maxLength" : 100, "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "Type of item\n\\* addon -\n\nA recurring component that can be added to a bundle plan.\n\\* charge -\n\nA non-recurring component that can be added to a bundle plan.\n\\* plan -\n\nAn essential component of the bundle plan.\n**Note:**\nAt least one plan item should be associated with the bundle.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Quantity of the item(plan, addon, and charge) associated with the bundle.\n", "minimum" : 1, "example" : null }, "price_allocation" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Price allocation of the item(plan, addon, and charge) associated with the bundle.\n", "maximum" : 100, "minimum" : 0, "example" : null } }, "required" : [ "item_id" ], "example" : null }, "example" : null }, "bundle_configuration" : { "type" : "object", "deprecated" : false, "description" : "

This attribute holds additional information about the bundle item. This attribute is only available when the item_type\nis plan\n.

", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "

Type of the bundle

\n* fixed -

Fixed bundle_configuration.type\nappears when you create a bundle plan that cannot be updated during checkout or subscription creation.

", "enum" : [ "fixed" ], "example" : null } }, "example" : null } }, "required" : [ "deleted", "enabled_for_checkout", "enabled_in_portal", "id", "is_giftable", "metered", "name", "type" ], "example" : null }, "ItemBillingMetric" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "contract_term_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "unit_amount_per_billing_cycle" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "quantity_per_billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "effective_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "effective_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "total_tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "total_discount_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "mrr" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "invoice_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "contract_created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "currency_code", "customer_id", "effective_from", "effective_to", "id", "item_price_id", "modified_at", "quantity_per_billing_cycle", "total_contract_value", "total_discount_amount", "total_tax_amount", "unit_amount_per_billing_cycle" ], "example" : null }, "ItemCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item" } }, "required" : [ "item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item" } }, "required" : [ "item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemEntitlement" : { "type" : "object", "description" : "**Deprecated**\n\nThe Item Entitlements API is deprecated and no longer maintained. Migrate your integration to [Entitlements API](/docs/api/entitlements). \n**Warning**\n\nAPI operations listed on this page are not supported when [grandfathering](/docs/api/entitlements) is enabled.\n\n[Items](/docs/api/items) represent the products or services that you offer to your customers. Items often differ from each other in the product [features](/docs/api/features) that are available in them. An item entitlement object represents the entitlement an item has towards a feature. An item can have multiple such entitlements, each corresponding to a unique feature it is entitled to.\nItem entitlements can be created while [creating a feature](/docs/api/features/create-a-feature). All subscriptions containing an item also [inherit](/docs/api/subscription_entitlements) its entitlements.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

A unique identifier for the item_entitlement.\nThis is auto-generated.

", "maxLength" : 100, "example" : null }, "item_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the item\nto which this entitlement belongs.

", "maxLength" : 100, "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "

The type\nof the item\nto which this entitlement belongs.

\n* charge -

Charge

\n* item -

Item

\n* subscription -

Subscription

\n* addon -

Addon

\n* plan -

Plan

", "enum" : [ "plan", "addon", "charge", "subscription", "item" ], "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the feature towards which this entitlement has been granted.

", "maxLength" : 50, "example" : null }, "feature_name" : { "type" : "string", "deprecated" : false, "description" : "

The name\nof the feature\ntowards which this entitlement has been granted.

", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type\n:

\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

The display name for the entitlement level. The default values are auto-generated based on feature.type as follows:

\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null }, "ItemEntitlementsRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" }, "impacted_item" : { "$ref" : "#/components/schemas/ImpactedItem" }, "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" } }, "required" : [ "feature", "impacted_item", "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemEntitlementsUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" }, "impacted_item" : { "$ref" : "#/components/schemas/ImpactedItem" }, "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" } }, "required" : [ "feature", "impacted_item", "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemFamily" : { "type" : "object", "additionalProperties" : true, "description" : "If you're a company that sells multiple product lines then each product line or service is an item family in the Chargebee API. For example, if you are a SaaS company that offers separate products for project management, content collaboration, and customer support. Each of those can be an item family under which the various plans, addons and charges can be the [items](/docs/api/items).\nItem families compartmentalize items such that only items belonging to the same family can be part of any given subscription. \n**Note:**\nYou must have the [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) enabled for your site to be able to set up item families.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier for the item family. It is unique and immutable.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the item family. This is visible only in Chargebee and not to customers.\n", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the item family. This is visible only in Chargebee and not to customers.\n", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Status of the item family.

\n* active -

The item family is active and can be used to create new items.

\n* deleted -

The item family has been deleted and cannot be used to create new items. The id\nand name\ncan be reused to create a new item family.

", "enum" : [ "active", "deleted" ], "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When the item family was last updated.\n", "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the\nbusiness entity\nof this item_family.\nThis is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.

\n", "maxLength" : 50, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the item family has been deleted or not.\n", "example" : null } }, "required" : [ "deleted", "id", "name" ], "example" : null }, "ItemFamilyCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item_family" : { "$ref" : "#/components/schemas/ItemFamily" } }, "required" : [ "item_family" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemFamilyDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item_family" : { "$ref" : "#/components/schemas/ItemFamily" } }, "required" : [ "item_family" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemFamilyUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item_family" : { "$ref" : "#/components/schemas/ItemFamily" } }, "required" : [ "item_family" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemPrice" : { "type" : "object", "additionalProperties" : true, "description" : "

An item price is a price point for an item. It defines the currency, pricing model, price, billing period and other attributes for an item. For example, consider a cloud storage service as an item. Then each of the following defines an item price:

Types of item prices

The type of an item price corresponds to the type of the item that the item price belongs to. In other words, item prices can be of the following types:

Billing periods for item prices

The billing period of an item price (applicable only to plan-item prices and addon-item prices) is the period of the item price in period_units.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier for the item price. It is unique and immutable.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

A unique display name for the item price in the Chargebee UI. If external_name\nis not provided, this is also used in customer-facing pages and documents such as invoices\nand hosted pages\n.

", "maxLength" : 100, "example" : null }, "item_family_id" : { "type" : "string", "deprecated" : false, "description" : "Id of the item_family\n", "maxLength" : 100, "example" : null }, "item_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item that the item price belongs to.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "

Description of the item price.

\n

Note:

", "maxLength" : 2000, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of the item price.

\n* 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.

\n* active -

The item price can be used in subscriptions.

\n* deleted -

Indicates that the item price has been deleted. The id\nand name\ncan be reused.

", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the item price used in customer-facing pages and documents. These include invoices\nand hosted pages.\nIf not provided, then name\nis used

", "maxLength" : 100, "example" : null }, "price_variant_id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique identifier of a [price variant](/docs/api/price_variants).\n", "maxLength" : 100, "example" : null }, "proration_type" : { "type" : "string", "deprecated" : false, "description" : "

Note\nApplicable only for item prices with:

\n

Specifies how to manage charges or credits for the addon item price during a subscription update\nor estimating\na subscription update.

\n* site_default -

Use the site-wide proration setting\n.

\n* partial_term -

Prorate the charges or credits for the rest of the current term.

\n* full_term -

Charge the full price of the addon item price or give the full credit. Don't apply any proration.

", "enum" : [ "site_default", "partial_term", "full_term" ], "example" : null }, "pricing_model" : { "type" : "string", "default" : "flat_fee", "deprecated" : false, "description" : "

The pricing scheme for this item price. If subscriptions, invoices or differential prices exist for this item price, pricing_model cannot be changed.

\n* tiered -

There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.

\n* per_unit -

A fixed price per unit quantity.

\n* flat_fee -

A fixed price that is not quantity-based.

\n* volume -

The per unit price is based on the tier that the total quantity falls in.

\n* 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" ], "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The cost of the item price when the pricing model is flat_fee.\nWhen the pricing model is per_unit\n, 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\n.

", "minimum" : 0, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The price of the item when the pricing_model is flat_fee.\nWhen the pricing model is per_unit\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "\n

If subscriptions or invoices exist for this item price, period\ncannot be changed. The period\nis mandatory when the item type\nis plan\nor addon

", "minimum" : 1, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The currency code (ISO 4217 format\n) for the item price. If subscriptions, invoices or differential prices\nexist for this item price, currency_code\ncannot be changed.

", "maxLength" : 3, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nIf subscriptions or invoices exist for this item price, period_unit\ncannot be changed. The period_unit\nis mandatory when the item type\nis plan\nor addon

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "trial_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The trial period of the plan in trial_period_unit\ns. You can also set trial periods for addons\n; contact Support\nto enable that feature.

", "minimum" : 0, "example" : null }, "trial_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for trial_period\n.

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "month" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "

Applicable only when End-of-trial Action\nhas been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the item.type\nis plan\nand a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the subscription-level\n.

\n* cancel_subscription -

The subscription cancels.

\n* activate_subscription -

The subscription activates and charges are raised for non-metered items.

\n* site_default -

The action configured for the site\nat the time when the trial ends, takes effect.

", "enum" : [ "site_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "shipping_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Defines the shipping frequency. Example: to bill customer every 2 weeks, provide \"2\" here.\n", "minimum" : 1, "example" : null }, "shipping_period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines the shipping frequency in association with shipping period.\n\\* year -\n\nA period of 1 calendar year.\n\\* day -\n\nA period of 24 hours.\n\\* week -\n\nA period of 7 days.\n\\* month -\n\nA period of 1 calendar month.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The default number of billing cycles a subscription to the plan must run. Can be overridden for a subscription.\nAddons can also have billing cycles. Also, for addons, you can override this while attaching it to a plan. However, if you provide the value while applying the addon to a subscription, then that value takes still higher precedence.\nIf subscriptions, invoices or differential prices\nexist for this item price, billing_cycles\ncannot be changed.

\n

Note:\nIf you want to change the billing_cycles\nto unlimited renewals, enter an empty string. This value can only be updated if the item_price\nis not attached to a subscription or invoice. If no billing_cycles\nvalue is entered, then by default the value will be set as unlimited billing_cycles\nrenewals.

", "minimum" : 1, "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

Free quantity the subscriptions of this plan item_price will have. Only the quantity exceeding this value will be charged in the subscription.

\n

Note:

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \nIn-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\nfor more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this item price was last updated\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this item price was created\n", "example" : null }, "usage_accumulation_reset_frequency" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the frequency at which the usage counter needs to be reset.

\n

Note:\nChanges to the usage_accumulation_reset_frequency\nparameter for item_price\nis not allowed if the item\nis already linked to a subscription.

\n* never -

Accumulates usage without ever resetting it.

\n* subscription_billing_frequency -

Accumulates usage until the subscription's billing frequency ends.

", "enum" : [ "never", "subscription_billing_frequency" ], "example" : null }, "archived_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this item price was archived.\n", "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "is_taxable" : { "type" : "boolean", "default" : true, "deprecated" : false, "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)\nhave been disabled in Chargebee. However, the value is effective only while Taxes are enabled.\n", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the item price. \\[Learn more\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "Type of item.\n\\* charge -\n\nA 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](/docs/api/v2/pcv-1/invoices/create-invoice-for-a-one-time-charge)\nwithout being applied to a subscription.\n\\* plan -\n\nAn 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.\n\\* addon -\n\nA recurring component that can be added to a subscription in addition to its plan.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "show_description_in_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "Whether the item price's description should be shown on [invoice PDFs](/docs/api/invoices/retrieve-invoice-as-pdf).\nIf 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)\n) after the change are affected; past invoices are not.\n", "example" : null }, "show_description_in_quotes" : { "type" : "boolean", "deprecated" : false, "description" : "Whether the item price's description should be shown on [quote PDFs](/docs/api/quotes/retrieve-quote-as-pdf).\nIf this Boolean is changed, only quotes created after the change are affected; past quotes are not.\n", "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the item price has been deleted ot not.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the\nbusiness entity\nof this item_family.\nThis is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.

\n", "maxLength" : 50, "example" : null }, "tiers" : { "type" : "array", "deprecated" : false, "description" : "

List of quantity-based pricing tiers for the item price. Applicable only for tiered\n, volume\n, and stairstep\npricing_models\n.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 1, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "price" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume\n; the total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency\n.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20, consuming 400 units will result in a charge of $80 (4 × $20).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "price", "starting_unit" ], "example" : null }, "example" : null }, "tax_detail" : { "type" : "object", "deprecated" : false, "description" : "The tax details for the item price. Includes those details relevant for third-party integrations.\n", "properties" : { "tax_profile_id" : { "type" : "string", "deprecated" : false, "description" : "The tax profile of the item price.\n", "maxLength" : 50, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the [Avalara sale type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* retail -\n\nTransaction is a sale to an end user\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the [Avalara transaction type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the [Avalara service type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n", "example" : null }, "avalara_tax_code" : { "type" : "string", "deprecated" : false, "description" : "The [Avalara tax codes](https://taxcode.avatax.avalara.com)\nfor the item price. Applicable only if you use [AvaTax for Sales integration](https://www.chargebee.com/docs/2.0/avatax-for-sales.html)\n.\n", "maxLength" : 50, "example" : null }, "hsn_code" : { "type" : "string", "deprecated" : false, "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "maxLength" : 50, "example" : null }, "taxjar_product_code" : { "type" : "string", "deprecated" : false, "description" : "The [TaxJar product code](https://developers.taxjar.com/api/reference/#get-list-tax-categories)\nfor the item price. Applicable only if you use [TaxJar integration](https://www.chargebee.com/docs/2.0/taxjar.html)\n.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "array", "deprecated" : false, "description" : "List of vendor specific tax related information.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "provider_name" : { "type" : "string", "deprecated" : false, "description" : "Name of the tax provider currently supported.\n", "maxLength" : 50, "example" : null }, "field_id" : { "type" : "string", "deprecated" : false, "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "maxLength" : 50, "example" : null }, "field_value" : { "type" : "string", "deprecated" : false, "description" : "The value of the corresponding tax field.\n", "maxLength" : 50, "example" : null } }, "required" : [ "field_id", "field_value", "provider_name" ], "example" : null }, "example" : null }, "accounting_detail" : { "type" : "object", "deprecated" : false, "description" : "Accounting integration details. The values are typically dependent on the \\[accounting integration\\](https://www.chargebee.com/docs/finance-integration-index.html) used.\n", "properties" : { "sku" : { "type" : "string", "deprecated" : false, "description" : "This maps to the sku or product name in the accounting integration.\n", "maxLength" : 100, "example" : null }, "accounting_code" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the chart of accounts under which the item price falls in the accounting system.\n", "maxLength" : 100, "example" : null }, "accounting_category1" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n\n", "maxLength" : 100, "example" : null }, "accounting_category2" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n\n", "maxLength" : 100, "example" : null }, "accounting_category3" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n", "maxLength" : 100, "example" : null }, "accounting_category4" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**NetSuite:**](https://www.chargebee.com/docs/2.0/netsuite.html ) Provide the \"Revenue Recognition Rule Id\" for the product from NetSuite.\n* [**Intacct:**](https://www.chargebee.com/docs/2.0/intacct.html ) If you have configured \"Revenue Recognition Templates\" for products in Intacct, provide the template ID for the product.\n", "maxLength" : 100, "example" : null } }, "example" : null } }, "required" : [ "created_at", "currency_code", "deleted", "free_quantity", "id", "name", "pricing_model" ], "example" : null }, "ItemPriceCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice" } }, "required" : [ "item_price" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemPriceDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice" } }, "required" : [ "item_price" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemPriceEntitlementsRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" }, "impacted_item_price" : { "$ref" : "#/components/schemas/ImpactedItemPrice" }, "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" } }, "required" : [ "feature", "impacted_item_price", "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemPriceEntitlementsUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "feature" : { "$ref" : "#/components/schemas/Feature" }, "metadata" : { "$ref" : "#/components/schemas/Metadata" }, "impacted_item_price" : { "$ref" : "#/components/schemas/ImpactedItemPrice" }, "impacted_subscription" : { "$ref" : "#/components/schemas/ImpactedSubscription" } }, "required" : [ "feature", "impacted_item_price", "impacted_subscription", "metadata" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemPriceUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item_price" : { "$ref" : "#/components/schemas/ItemPrice" } }, "required" : [ "item_price" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ItemType" : { "type" : "string", "deprecated" : false, "enum" : [ "plan", "addon", "charge" ], "example" : null }, "ItemUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "item" : { "$ref" : "#/components/schemas/Item" } }, "required" : [ "item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Layout" : { "type" : "string", "deprecated" : false, "enum" : [ "in_app", "full_page" ], "example" : null }, "LedgerAccountBalance" : { "type" : "object", "description" : "

Credit Grants

A credit grant is a quantified allocation of credits given to a subscription through a configured item price or via the allocate operation, consumed over time through ledger operations.

Example

A subscription receives a credit grant of 100 AI credits as a balance. As the customer uses AI features\n(e.g., Image Generation), the provisioned balance is consumed first. Once exhausted, further consumption is deducted from the overdraft balance until its limit is reached.

The Ledger Account Balance object

The ledger_account_balance object is a real-time snapshot of credit grants for a single combination of subscription_id, unit_id and unit_type.

The ledger tracks two balances:

Note

These two balances are always tracked together for a subscription with credit grants.

Example

A subscription has a credit grant of 100 AI credits, added to its provisioned balance. Once the provisioned balance is exhausted, further consumption is drawn from the overdraft balance up to its configured limit.

screenshot|/images/account_balance.png

Returned by

", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) this account belongs to.\n", "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit this account tracks. For example, a credit unit id such as ai_credits.

", "maxLength" : 50, "example" : null }, "unit_type" : { "type" : "string", "deprecated" : false, "description" : "Type of unit used for this balance.\n\\* credit_unit -\n\nThe unit represents a credit unit, the type used by credit grants.\n", "enum" : [ "credit_unit" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when this ledger account balance was first recorded.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (seconds) when the balance was last updated. For example, after [allocate](/docs/api/ledger_operations/allocate), [capture](/docs/api/ledger_operations/capture), or [authorize](/docs/api/ledger_operations/authorize).\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version is updated with a new timestamp for every change made to the resource.

", "example" : null }, "provisioned_balance" : { "type" : "object", "deprecated" : false, "description" : "Stores credit grants given through the configured item price. Used first before overdraft.\n", "properties" : { "total_balance" : { "type" : "string", "deprecated" : false, "description" : "

Total granted credits remaining, including held amounts.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

total_balance = usable_balance + hold_amount

\n

Example: If a subscription has a credit grant of 100 AI credits and 30 have been consumed, total_balance is 70.

", "maxLength" : 36, "example" : null }, "usable_balance" : { "type" : "string", "deprecated" : false, "description" : "

Credits available for immediate use (excludes held amount).\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Example: If total_balance is 70 and hold_amount is 5, usable_balance is 65.

", "maxLength" : 36, "example" : null }, "hold_amount" : { "type" : "string", "deprecated" : false, "description" : "

Credits reserved for in-progress operations (e.g., authorize); not currently usable.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Example: If 10 AI credits are reserved for a pending operation, hold_amount is 10 and usable_balance is reduced accordingly.

", "maxLength" : 36, "example" : null } }, "required" : [ "hold_amount", "total_balance", "usable_balance" ], "example" : null }, "overdraft_balance" : { "type" : "object", "deprecated" : false, "description" : "Extra credit available after provisioned balance is exhausted.\n", "properties" : { "is_unlimited" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Whether overdraft has no limit (true) or is capped (false). When true, the limit, total_balance, usable_balance, and hold_amount fields are null.

", "example" : null }, "limit" : { "type" : "string", "deprecated" : false, "description" : "

Maximum overdraft allowed. Present only when overdraft_balance.is_unlimited is false.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "total_balance" : { "type" : "string", "deprecated" : false, "description" : "

Total granted credits remaining, including held amounts.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Example: If limit is 25 and used_amount is 10, the remaining overdraft capacity is 15.

", "maxLength" : 36, "example" : null }, "usable_balance" : { "type" : "string", "deprecated" : false, "description" : "

Remaining overdraft available for use.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Usable Balance (Only if Capped): limit - used_amount - hold_amount.

", "maxLength" : 36, "example" : null }, "used_amount" : { "type" : "string", "deprecated" : false, "description" : "

Credits already consumed from overdraft.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "hold_amount" : { "type" : "string", "deprecated" : false, "description" : "

Overdraft credits reserved for in-progress operations.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null } }, "required" : [ "hold_amount", "is_unlimited", "used_amount" ], "example" : null } }, "required" : [ "created_at", "modified_at", "subscription_id", "unit_id", "unit_type" ], "example" : null }, "LedgerAccountBalanceUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "ledger_account_balance" : { "$ref" : "#/components/schemas/LedgerAccountBalance" } }, "required" : [ "ledger_account_balance" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "LedgerEntry" : { "type" : "object", "description" : "

A ledger entry is the lowest-level, immutable record of a single movement of credit grants against one grant block. While a ledger operation represents the business action (for example, a capture or authorize), each operation is expanded internally into one or more ledger entries that describe exactly how individual grant blocks were affected.

Behavior

Usage

Ledger entries provide the granular, per-grant-block audit trail.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for this ledger entry. \n**Behavior**\n\n* Automatically assigned by the ledger at creation time.\n* Immutable and cannot be modified once written.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) against which this ledger entry was recorded.\n", "maxLength" : 50, "example" : null }, "account_type" : { "type" : "string", "deprecated" : false, "description" : "The account this entry belongs to: **provisioned** (credit grants issued per the plan, consumed first) or\n**overdraft** (consumption beyond the configured credit grants, after the provisioned account is exhausted).\n\\* overdraft -\n\nAllows consumption beyond the configured credit grants. Used once the credit grants in the provisioned account\nare exhausted.\n\\* provisioned -\n\nStores the credit grants given as per the plan configuration. Consumption of credit grants is first done\nthrough this account.\n", "enum" : [ "provisioned", "overdraft" ], "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit this entry affects. For example, a credit unit id such as ai_credits.

", "maxLength" : 50, "example" : null }, "unit_type" : { "type" : "string", "deprecated" : false, "description" : "Type of unit used for this entry.\n\\* credit_unit -\n\nThe unit represents a credit unit, the type used by credit grants.\n", "enum" : [ "credit_unit" ], "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "description" : "

The number of credit grants moved by this entry against a single grant block.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Behavior

", "maxLength" : 36, "example" : null }, "grant_block_start_balance" : { "type" : "string", "deprecated" : false, "description" : "

The grant block balance immediately before this ledger entry was applied.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "grant_block_end_balance" : { "type" : "string", "deprecated" : false, "description" : "

The grant block balance immediately after this ledger entry was applied.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "account_start_balance" : { "type" : "string", "deprecated" : false, "description" : "

The account balance (provisioned or overdraft, matching account_type) immediately before this ledger entry was applied.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "account_end_balance" : { "type" : "string", "deprecated" : false, "description" : "

The account balance (provisioned or overdraft, matching account_type) immediately after this ledger entry was applied.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

", "maxLength" : 36, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the direction of the movement of credit grants recorded by this entry.\n\\* debit -\n\nCredit grants consumed from a grant block.\n\\* credit -\n\nCredit grants added when a grant block is allocated.\n\\* unhold -\n\nCredit grants released allowing the amount to go from hold amount back to the usable amount via\nrelease_authorization or the auto-release job.\n\\* hold -\n\nCredit grants reserved on a grant block by an authorize operation, moved from usable balance to hold amount.\n", "enum" : [ "credit", "debit", "hold", "unhold" ], "example" : null }, "ledger_operation_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the ledger operation that produced this entry. Multiple\nentries can share the same ledger_operation_id when a single operation spans more than one grant block\nor produces more than one movement.

", "maxLength" : 50, "example" : null }, "grant_block_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the [grant block](/docs/api/grant_blocks) this entry acts upon.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when this ledger entry was recorded in the ledger. \n**Behavior**\n\n* Automatically set by the ledger at creation time.\n* Immutable and cannot be modified once written.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when this ledger entry record was last updated in the ledger.\n", "example" : null } }, "required" : [ "account_end_balance", "account_start_balance", "amount", "created_at", "grant_block_end_balance", "grant_block_id", "grant_block_start_balance", "id", "ledger_operation_id", "modified_at", "type" ], "example" : null }, "LedgerOperation" : { "type" : "object", "description" : "A ledger operation represents a single action recorded in the ledger that results in a state change. Each ledger operation corresponds to one atomic event, whether initiated externally or internally. \n**Behavior**\n\n* Ledger Operations are immutable once recorded.\n* They provide traceability, idempotency, and a complete audit trail of all state transitions. \n**Usage**\n\nServes as the fundamental unit for representing, tracking, and reconciling all changes within the system.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for this ledger operation. \n**Behavior**\n\n* In case of external ledger operations, the id can be optionally provided by the upstream system.\n* In case of internal ledger operations, the id is generated by the ledger.\n* Immutable and cannot be modified once written.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) against which this ledger operation was recorded.\n", "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the credit unit this ledger operation affects. For example, a credit unit id such as ai_credits.

", "maxLength" : 100, "example" : null }, "unit_type" : { "type" : "string", "deprecated" : false, "description" : "Type of unit used for this ledger operation.\n\\* credit_unit -\n\nThe unit represents a credit unit, the type used by credit grants.\n", "enum" : [ "credit_unit" ], "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the type of ledger operation, indicating the kind of business event this record represents.

\n

Types

External Ledger Operations: Triggered via API calls

Internal Ledger Operations: Triggered via system processes

\n* authorize -

Reserves credit grants (moves from usable_balance to hold_amount) for later capture or release.

\n* release_authorization -

Returns a hold to the usable balance, or finalizes an auto-release of the hold.

\n* allocation -

Credit grants allocated into an account, such as allocations created from configured credit grants or the allocate operation.

\n* void -

Credit grants removed from a grant block through administrative updates.

\n* rollover -

Carry-forward of balance into a new grant block or related rollover run.

\n* capture -

Immediate one-step debit of credit grants from the usable balance.

\n* expiry -

Credit grants expired from a grant block (and related account movements).

\n* capture_authorization -

Finalizes a hold, converting all or part of the held amount into a final debit; any remainder can be\nauto-released.

\n* adjustment -

When overdraft is in adjustment mode, new credit grants can adjust an existing overdraft balance.

", "enum" : [ "allocation", "capture", "authorize", "release_authorization", "capture_authorization", "expiry", "void", "rollover", "adjustment" ], "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "description" : "

Represents the quantity of credit grants affected by this ledger operation.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Behavior by Ledger Operation Type

", "maxLength" : 36, "example" : null }, "provisioned_start_balance" : { "type" : "string", "deprecated" : false, "description" : "

The provisioned account balance immediately before this ledger operation was applied.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Usage

Use alongside provisioned_end_balance to trace exactly how each ledger operation moved the provisioned account balance over time.

", "maxLength" : 36, "example" : null }, "provisioned_end_balance" : { "type" : "string", "deprecated" : false, "description" : "

The provisioned account balance immediately after this ledger operation was applied.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Usage

Use alongside provisioned_start_balance to trace exactly how each ledger operation moved the provisioned account balance over time.

", "maxLength" : 36, "example" : null }, "overdraft_start_balance" : { "type" : "string", "deprecated" : false, "description" : "

The overdraft account balance immediately before this ledger operation was applied.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Usage

Use alongside overdraft_end_balance to trace exactly how each ledger operation moved the overdraft account balance over time.

", "maxLength" : 36, "example" : null }, "overdraft_end_balance" : { "type" : "string", "deprecated" : false, "description" : "

The overdraft account balance immediately after this ledger operation was applied.\nReturned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

\n

Usage

Use alongside overdraft_start_balance to trace exactly how each ledger operation moved the overdraft account balance over time.

", "maxLength" : 36, "example" : null }, "parent_ledger_operation_id" : { "type" : "string", "deprecated" : false, "description" : "

The ledger_operation_id of the parent authorize ledger operation associated with this ledger operation.

\n

Usage

\n

Constraints

", "maxLength" : 50, "example" : null }, "ledger_operation_timestamp" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Unix timestamp (in seconds) representing when the business event occurred in the upstream system. Used for period attribution, grace-period eligibility, and reporting accuracy.

\n

Note

Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.

\n

Constraints

", "example" : null }, "auto_release_timestamp" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when an unfinalized hold amount from an authorize request will be automatically released back to the usable balance. \n**Behavior**\n\n* Applies only to authorize ledger operations.\n* If not explicitly provided, the system assigns a default expiry.\n* Defaults to approximately 10 minutes after the authorize request is processed. \n**Usage**\n\nEnsures held credit grants are not locked indefinitely by abandoned or unfinalized authorizations. \n**Note**\n\n* By default, the value reflects what is provided in the request.\n* If the specified timestamp exceeds the end of the block's grace period, it is adjusted (clamped) to the grace period end and returned in the response.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when this ledger operation was recorded in the system. \n**Behavior**\n\n* Automatically set by the system at the time of persistence.\n* Immutable and cannot be modified once written. \n**Note**\n\nServes as the source of truth for ordering ledger operations and tracking how they affected the balance over time.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp (in seconds) indicating when this ledger operation record was last updated in the system. \n**Behavior**\n\nAutomatically updated by the system whenever the record is modified.\n", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Optional opaque JSON object carrying additional business context \\*\\*Behavior\\*\\* \\* Stored as-is and returned verbatim by the system. \\* Not interpreted, validated, or indexed by the system.\n", "example" : null } }, "required" : [ "amount", "created_at", "id", "ledger_operation_timestamp", "modified_at", "overdraft_end_balance", "overdraft_start_balance", "provisioned_end_balance", "provisioned_start_balance", "type" ], "example" : null }, "LedgerUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "ledger_operations" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/LedgerOperation" }, "example" : null }, "ledger_account_balance" : { "$ref" : "#/components/schemas/LedgerAccountBalance" }, "grant_blocks" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/GrantBlock" }, "example" : null }, "ledger_entries" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/LedgerEntry" }, "example" : null } }, "required" : [ "grant_blocks", "ledger_account_balance", "ledger_entries", "ledger_operations" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Level" : { "type" : "object", "description" : "This resource returns the entitlement level attributes.\n", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive display name for the entitlement level. Provide a name that helps you clearly identify the entitlement level. For example: a feature such as Email Support\ncan have entitlement levels named as All weekdays\n, All days\n, 40 hours per week\nand so on.

\n

When not provided for feature.type\nquantity\nor range\n, this name is auto-generated as the space-separated concatenation of levels[].value\nand the pluralized version of unit.\nFor example, if levels[].value\nis 20\nand unit\nis user\n, then levels[].name\nbecomes 20 users\n.

", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

The value denoting the entitlement level granted.

\n", "maxLength" : 50, "example" : null }, "level" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

This attribute represents the order of the entitlement levels from lowest to highest.

\n\n

When not defined, it is assumed as the index of the levels[]\narray.

", "example" : null }, "is_unlimited" : { "type" : "boolean", "deprecated" : false, "description" : "

When type\nis quantity\nor range\n, this attribute indicates whether the entitlement level corresponds to unlimited units of the feature. Possible values:

\n", "example" : null } }, "required" : [ "is_unlimited", "level", "value" ], "example" : null }, "Media" : { "type" : "object", "description" : "A media artifact uploaded to Chargebee.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier for the media file. This is auto-generated by Chargebee.\n", "maxLength" : 42, "minLength" : 8, "example" : null }, "url" : { "type" : "string", "deprecated" : false, "description" : "The public URL for accessing the media file. This is auto-generated by Chargebee.\n", "maxLength" : 512, "minLength" : 10, "example" : null }, "alt_text" : { "type" : "string", "deprecated" : false, "description" : "

The alternative text\nfor the image. Applicable only when the top-level media_type\nis image\n.

", "maxLength" : 128, "minLength" : 2, "example" : null }, "media_type" : { "type" : "string", "deprecated" : false, "description" : "The [media type](https://en.wikipedia.org/wiki/Media_type)\nof the file.\n", "maxLength" : 20, "example" : null } }, "required" : [ "id" ], "example" : null }, "Metadata" : { "type" : "object", "properties" : { "change_type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "example" : null }, "Meter" : { "type" : "object", "description" : "A **meter** captures the usage measurement configuration of a [metered feature](/docs/api/metered_features).\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

A unique identifier for the meter. This is the same as feature.id.

", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive name for the meter. For example: API Calls, Input Tokens.

", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief description of the meter.\n", "maxLength" : 500, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of meter that determines how usage is measured for the meter.

\n* compound -

Usage is computed from a mathematical formula combining other meters.

\n* simple -

Usage is computed from the SQL query over usage_event properties.

", "enum" : [ "simple", "compound" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The current status of the meter.

\n* active -

The meter is active and new entitlements can be created towards it.

\n* deleted -

The meter has been permanently deleted.

\n* archived -

No new entitlements can be created towards the meter. However, any pre-existing entitlements from the time that the meter was active remain effective.

", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "query" : { "type" : "string", "deprecated" : false, "description" : "

The SQL query used to measure usage from usage_event properties. For example: SELECT SUM(api_calls) FROM events.

", "maxLength" : 500, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When the meter was created.\n", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When the meter was last updated.\n", "example" : null }, "column_definitions" : { "type" : "array", "deprecated" : false, "description" : "

Definitions of the columns or properties referenced by the meter's query. Each entry describes one column used to measure usage.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "column_name" : { "type" : "string", "deprecated" : false, "description" : "

Name of the column or property used in the query. For example, request_count or input_tokens.

", "maxLength" : 100, "example" : null }, "data_type" : { "type" : "string", "deprecated" : false, "description" : "Data type of the column or property.\n\\* string -\n\nThe column or property holds a string value.\n\\* number -\n\nThe column or property holds a numeric value.\n", "enum" : [ "number", "string" ], "example" : null } }, "required" : [ "column_name", "data_type" ], "example" : null }, "example" : null }, "features" : { "type" : "array", "deprecated" : false, "description" : "The [feature](/docs/api/features) associated with this meter. This array has only one element since any given meter is associated with only one feature.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

A unique and immutable identifier for the feature. This is the same as meter.id.

", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A case-sensitive unique name for the feature.\n", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief description of the feature.\n", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The current status of the feature.

\n* draft -

This value is not applicable for metered features.

\n* active -

The feature is published. Any entitlements or subscription entitlements defined for the feature take effect immediately.

\n* archived -

No new entitlements or subscription entitlements can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was active remain effective.

", "enum" : [ "active", "archived", "draft" ], "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of feature. The value is always range.

\n* custom -

This value is not applicable for metered features.

\n* range -

The feature is quantity based, with entitlement levels between 1 and unlimited.

\n* quantity -

This value is not applicable for metered features.

\n* switch -

This value is not applicable for metered features.

", "enum" : [ "switch", "custom", "quantity", "range" ], "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the unit of measure. The value is expected in the singular form. It is pluralized automatically as needed. For example, for a feature such as user licenses, the unit can be license.

", "maxLength" : 50, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version is updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When the feature was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When the feature was created.\n", "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the feature is metered. Always true.

", "example" : null }, "levels" : { "type" : "array", "deprecated" : false, "description" : "An ordered list of entitlement levels available for the feature.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "A case-sensitive display name for the entitlement level.\n", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

Always 1 for levels[0] and unlimited for levels[1].

", "maxLength" : 50, "example" : null }, "level" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "This attribute represents the order of the entitlement levels from lowest to highest.\n", "example" : null }, "is_unlimited" : { "type" : "boolean", "deprecated" : false, "description" : "

Always true for levels[1] and false for levels[0].

", "example" : null } }, "required" : [ "is_unlimited", "level", "value" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "id", "metered", "name" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "id", "name", "query", "type" ], "example" : null }, "MeterType" : { "type" : "string", "deprecated" : true, "enum" : [ "simple", "compound" ], "example" : null }, "MeteredFeature" : { "type" : "object", "description" : "A metered feature object represents two things:\n\n* the [feature](/docs/api/features) whose entitlement is consumed based on measured usage.\n* the configuration that measures that usage.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

A unique identifier for the metered feature. This is the same as feature.id.

", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive name for the metered feature. For example: API Calls, Input Tokens.

", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief description of the metered feature.\n", "maxLength" : 250, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of meter. Determines how usage is measured for the metered feature.

\n* compound -

Usage is computed from a mathematical formula combining other meters.

\n* simple -

Usage is computed from a SQL query over usage_event properties.

", "enum" : [ "simple", "compound" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The current status of the metered feature.\n\\* active -\n\nThe metered feature is active and **new** [entitlements](/docs/api/entitlements) and [subscription entitlements](/docs/api/subscription_entitlements) can be created for it.\n\\* deleted -\n\nThe metered feature has been permanently deleted.\n\\* archived -\n\nNo **new** [entitlements](/docs/api/entitlements) and [subscription entitlements](/docs/api/subscription_entitlements) can be created for the metered feature. However, any pre-existing entitlements and subscription entitlements remain effective.\n", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "query" : { "type" : "string", "deprecated" : false, "description" : "

The SQL query used to measure usage from usage_event properties. For example: SELECT SUM(api_calls) FROM events.

\n

Constraint:

", "maxLength" : 500, "example" : null }, "column_definitions" : { "type" : "array", "deprecated" : false, "description" : "

Definitions of the columns or properties referenced by the metered feature's query.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "column_name" : { "type" : "string", "deprecated" : false, "description" : "

Name of the column or property used in the query. For example, request_count or input_tokens.

", "maxLength" : 100, "example" : null }, "data_type" : { "type" : "string", "deprecated" : false, "description" : "Data type of the column or property.\n\\* string -\n\nThe column or property holds a string value.\n\\* number -\n\nThe column or property holds a numeric value.\n", "enum" : [ "number", "string" ], "example" : null } }, "required" : [ "column_name", "data_type" ], "example" : null }, "example" : null }, "features" : { "type" : "array", "deprecated" : false, "description" : "The [feature](/docs/api/features) associated with this metered feature. This array has only one element since any given metered feature is associated with only one feature.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

A unique and immutable identifier for the feature. This is the same as id.

", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A case-sensitive unique name for the feature.\n", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief description of the feature.\n", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The current status of the feature.\n\\* draft -\n\nThis value is not applicable for metered features.\n\\* active -\n\nThe feature is active. Any [entitlements](/docs/api/entitlements) or [subscription entitlements](/docs/api/subscription_entitlements) defined for the feature take effect immediately.\n\\* archived -\n\nNo **new** [entitlements](/docs/api/entitlements) or [subscription entitlements](/docs/api/subscription_entitlements) can be created for the feature. However, any pre-existing entitlements and subscription entitlements remain effective.\n", "enum" : [ "active", "archived", "draft" ], "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of feature. The value is always range.

\n* custom -

This value is not applicable for metered features.

\n* range -

The feature is quantity based, with entitlement levels between 1 and unlimited.

\n* quantity -

This value is not applicable for metered features.

\n* switch -

This value is not applicable for metered features.

", "enum" : [ "switch", "custom", "quantity", "range" ], "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the unit of measure. The value is expected in the singular form. It is pluralized automatically as needed. For example, for a feature such as API Calls, the unit can be request.

", "maxLength" : 50, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version is updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When the feature was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When the feature was created.\n", "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the feature is metered. The value is always true.

", "example" : null }, "levels" : { "type" : "array", "deprecated" : false, "description" : "An ordered list of entitlement levels available for the feature.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "A case-sensitive display name for the entitlement level.\n", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

Always 1 for levels[0] and unlimited for levels[1].

", "maxLength" : 50, "example" : null }, "level" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "This attribute represents the order of the entitlement levels from lowest to highest.\n", "example" : null }, "is_unlimited" : { "type" : "boolean", "deprecated" : false, "description" : "

Always true for levels[1] and false for levels[0].

", "example" : null } }, "required" : [ "is_unlimited", "level", "value" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "id", "metered", "name" ], "example" : null }, "example" : null } }, "required" : [ "id" ], "example" : null }, "Mode" : { "type" : "string", "deprecated" : false, "enum" : [ "absolute", "percentage" ], "example" : null }, "MrrUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" } }, "required" : [ "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "NetdPaymentDueReminderEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "NonSubscription" : { "type" : "object", "description" : "**Important:**\n\n* We've stopped giving access to the legacy solution due to the limitations mentioned [here](https://www.chargebee.com/docs/billing/2.0/mobile-subscriptions/mobile-subscriptions-limitations). Please [request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/omnichannel-subscription&ref=feature) for enabling the new [Omnichannel Subscriptions](/docs/api/recorded_purchases/recorded-purchase-object) solution.\n* These APIs operate asynchronously. When you receive a successful response code from an API call, it indicates only the successful submission of your request, not the completion of the operation.\n\nUsing the Non-Subscription resource, you can track one-time payments made for consumable, non-consumable, and non-renewing products in Chargebee. Call this API to notify Chargebee of non-subscription purchases made at stores.\n", "properties" : { "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The unique immutable identifier of the invoice imported in Chargebee for which the receipt was sent.\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique immutable identifier of the customer object to which the invoice belongs.\n", "maxLength" : 100, "example" : null }, "charge_id" : { "type" : "string", "deprecated" : false, "description" : "

The subscription_item.item_price_id where the item_type is charge.

", "maxLength" : 100, "example" : null } }, "required" : [ "charge_id", "invoice_id" ], "example" : null }, "NotifyReferralSystem" : { "type" : "string", "deprecated" : false, "enum" : [ "none", "first_paid_conversion", "all_invoices" ], "example" : null }, "OfferEvent" : { "type" : "object", "description" : "Offer events are used to record and list user interactions with personalized offers. By logging events such as views and dismissals, these APIs enable growth and analytics teams to measure the effectiveness of offers and optimize the offer funnel based on real usage data.\n", "example" : null }, "OfferFulfillment" : { "type" : "object", "description" : "

Offer fulfillment allows you to initiate, update, and retrieve the lifecycle of an offer fulfillment, after a personalized offer has been accepted. Whether the personalized offer triggers a direct billing change, a hosted checkout flow, or a redirect-based workflow, these APIs track acceptance, execution status, and completion, providing a consistent interface for fulfillment tracking and notifications.

Features of this object:

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "ID of the fulfillment that was created.\n", "maxLength" : 50, "example" : null }, "personalized_offer_id" : { "type" : "string", "deprecated" : false, "description" : "ID of the personalized offer that was accepted.\n", "maxLength" : 50, "example" : null }, "option_id" : { "type" : "string", "deprecated" : false, "description" : "ID of the offer option that was selected by the user.\n", "maxLength" : 50, "example" : null }, "processing_type" : { "type" : "string", "deprecated" : false, "description" : "The processing mode of the option. This indicates how the offer option is fulfilled: e.g., a direct billing change, a checkout flow, or a redirect to a URL.\n\\* webhook -\n\nChargebee triggers webhook and fulfillment is processed by your system\n\\* email -\n\nChargebee sends an email as configured in the Growth application and the fulfillment is processed by your system\n\\* checkout -\n\nThe offer fulfillment is processed using Chargebee hosted checkout\n\\* url_redirect -\n\nThe offer fulfillment is processed by your system\n\\* billing_update -\n\nThe offer fulfillment is processed by Chargebee\n", "enum" : [ "billing_update", "checkout", "url_redirect", "webhook", "email" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Current status of the offer fulfillment process.

\n* in_progress -

The offer fulfillment is underway (not yet completed).

\n* completed -

The offer was successfully applied . For URL redirects, this might be returned immediately if the action is completed, potentially along with a redirect_url if the user should be navigated to a specific page.

\n* failed -

The offer fulfillment failed. The error object\nfield will be present to provide more details in this case.

", "enum" : [ "in_progress", "completed", "failed" ], "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "A URL to which the user should be redirected. Returned only if the offer's processing type is billing_update or url_redirect\n", "maxLength" : 250, "example" : null }, "failed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the fulfillment failed (present only when status = failed).\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the fulfillment record was created.\n", "example" : null }, "completed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the fulfillment succeeded (present only when status = completed).\n", "example" : null }, "error" : { "type" : "object", "deprecated" : false, "description" : "Error details describing the reason for failure (present only if status is failed).\n", "properties" : { "code" : { "type" : "string", "deprecated" : false, "description" : "A Chargebee-defined code that corresponds to the specific error encountered during the fulfillment.\n\\* fulfillment_expired -\n\nReturned when the fulfillment has been in progress for more than 7 days, resulting in the system automatically marking it as failed.\n\\* internal_error -\n\nReturned when a system error occurred during fulfillment via checkout or billing updates.\n\\* external_fulfillment_failed -\n\nReturned when the fulfillment is marked as failed by the your system, particularly in cases involving URL redirects, webhooks, and email processing types.\n\\* billing_update_failed -\n\nReturned when Chargebee is unable to fulfill the offer while updating the Chargebee billing subscription.\n\\* checkout_abandoned -\n\nReturned when the checkout process was abandoned by the user.\n", "enum" : [ "billing_update_failed", "checkout_abandoned", "external_fulfillment_failed", "internal_error", "fulfillment_expired" ], "example" : null }, "message" : { "type" : "string", "deprecated" : false, "description" : "A descriptive message about the error. This is intended for your consumption and should not be displayed directly to end customers.\n", "maxLength" : 200, "example" : null } }, "required" : [ "code", "message" ], "example" : null } }, "required" : [ "created_at", "id", "option_id", "personalized_offer_id", "processing_type", "status" ], "example" : null }, "OfflinePaymentMethod" : { "type" : "string", "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" ], "example" : null }, "OmnichannelOneTimeOrder" : { "type" : "object", "description" : "This resource provides a unified representation of one-time order data across multiple [sources](/docs/api/omnichannel_one_time_orders/omnichannel_one_time_order-object#source)\n, such as the Apple App Store and Google Play Store. It maps the underlying data one-to-one into Chargebee's omnichannel format. Functioning as a **middleware**\n, this solution ensures the data is delivered in a consistent, standardized format as presented. \n**Note:**\nThis resource specifically represents in-app product purchases made via the Apple App Store and Google Play Store.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The ID generated by Chargebee for the recorded one-time order.\n", "maxLength" : 40, "example" : null }, "app_id" : { "type" : "string", "deprecated" : false, "description" : "

App Identifier in Chargebee. This is the handle created by Chargebee for your app. To get the app_id:

\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer\nobject that is associated with this one time order.

", "maxLength" : 100, "example" : null }, "id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the one_time_purchase in the source.\nFor Apple App Store, it is the Transaction ID\nof the initial_purchase_transaction.\nFor Google Play Store, it is the Order ID\nof the initial_purchase_transaction\n.

", "maxLength" : 500, "example" : null }, "origin" : { "type" : "string", "deprecated" : false, "description" : "

Country code indicating where the one-time order originated, such as US\nfor the United States.

", "maxLength" : 3, "example" : null }, "source" : { "type" : "string", "deprecated" : false, "description" : "

The source\nwhere the one-time order was originally made and managed.

\n* google_play_store -

The source of the app is google_play_store\n.

\n* apple_app_store -

The source of the app is apple_app_store\n.

", "enum" : [ "apple_app_store", "google_play_store" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the omnichannel_one_time_order\ncreated in Chargebee.

", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "omnichannel_one_time_order_items" : { "type" : "array", "deprecated" : false, "description" : "list of omnichannel_one_time_order_items in the omnichannel one time order\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Uniquely identifies a omnichannel_one_time_order_item

", "maxLength" : 40, "example" : null }, "item_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

Identifier of the purchased item in the original source\n(e.g., apple_app_store\nor google_play_store\n).

", "maxLength" : 100, "example" : null }, "item_type_at_source" : { "type" : "string", "deprecated" : false, "description" : "

Product type in the source\n.

", "maxLength" : 100, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The quantity of the omnichannel order item(s) purchased by the customer.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when this specific omnichannel_one_time_order_item\nwas cancelled\nin the source\n.

", "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason of the omnichannel_one_time_order\ncancellation for an item.

\n* merchant_revoked -

Indicates that the merchant revoked access to the order.

\n* refunded_for_other_reason -

Indicates that the order was cancelled and refunded for another reason.

\n* refunded_due_to_app_issue -

Indicates that the order was cancelled and refunded due to an app issue.

\n* customer_cancelled -

Indicates that the order was voluntarily cancelled by the customer.

\n* customer_did_not_consent_to_price_increase -

Indicates that the customer did not consent to the price increase for the order item.

", "enum" : [ "customer_cancelled", "customer_did_not_consent_to_price_increase", "refunded_due_to_app_issue", "refunded_for_other_reason", "merchant_revoked" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the omnichannel_one_time_order_item\ncreated in Chargebee.

", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null } }, "required" : [ "created_at", "id", "item_id_at_source" ], "example" : null }, "example" : null }, "purchase_transaction" : { "type" : "object", "deprecated" : false, "description" : "Details of the purchase transaction associated with the one-time order.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Unique identifier for the omnichannel_transaction\n.

", "maxLength" : 40, "example" : null }, "id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the one time order in the source.\nFor Apple App Store, it is the Transaction ID\nof the initial_purchase_transaction.\nFor Google Play Store, it is the Order ID\nof the initial_purchase_transaction\n.

", "maxLength" : 100, "example" : null }, "app_id" : { "type" : "string", "deprecated" : false, "description" : "

App Identifier in Chargebee. This is the handle created by Chargebee for your app. To get the app_id:

\n", "maxLength" : 100, "example" : null }, "price_currency" : { "type" : "string", "deprecated" : false, "description" : "The currency code for the transaction\n", "maxLength" : 3, "example" : null }, "price_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The whole units of the amount.\nFor example:\nif currencyCode is USD (i.e. two decimal currency), then the unit value for USD 1.23 will be 1\nif currencyCode is JPY (i.e. zero decimal currency), then the unit value for JPY 123 will be 123\nif currencyCode is BHD (i.e. three decimal currency), then the unit value for BHD 1.234 will be 1

", "example" : null }, "price_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The fractional price amount, in nanos (billionths of the currency unit).\nThe value must be between 0 and +999,999,999 inclusive.\nFor example:\nIf currencyCode is USD (i.e. two decimal currency), then nanos value for USD 1.23 will be 230,000,000\nIf currencyCode is JPY (i.e. zero decimal currency), then nanos value for JPY 123 will be 0\nIf currencyCode is BHD (i.e. three decimal currency), then nanos value for BHD 1.234 will be 234,000,000

", "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

The type of transaction that occurred in the source\n.

\n* renewal -

Indicates that the transaction was initiated as part of a renewal for a previously completed purchase.

\n* purchase -

Indicates that the transaction occurred for a purchase.

", "enum" : [ "purchase", "renewal" ], "example" : null }, "transacted_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Timestamp when the transaction occurred in the source\n.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the transaction was created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "linked_omnichannel_subscriptions" : { "type" : "array", "deprecated" : false, "description" : "

A list of omnichannel_subscription\nobjects linked to this transaction. Each entry represents a subscription associated with the transaction.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "omnichannel_subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the associated omnichannel subscription.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null }, "linked_omnichannel_one_time_orders" : { "type" : "array", "deprecated" : false, "description" : "

A list of omnichannel_one_time_order\nobjects linked to this transaction. Each entry represents a one-time order associated with the transaction.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "omnichannel_one_time_order_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the associated omnichannel one-time order.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null } }, "required" : [ "app_id", "created_at", "id", "id_at_source", "type" ], "example" : null } }, "required" : [ "app_id", "created_at", "id", "id_at_source", "omnichannel_one_time_order_items", "source" ], "example" : null }, "OmnichannelOneTimeOrderCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_one_time_order" : { "$ref" : "#/components/schemas/OmnichannelOneTimeOrder" }, "omnichannel_one_time_order_item" : { "$ref" : "#/components/schemas/OmnichannelOneTimeOrderItem" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_one_time_order", "omnichannel_one_time_order_item", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelOneTimeOrderItem" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "item_id_at_source" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "item_type_at_source" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "enum" : [ "customer_cancelled", "customer_did_not_consent_to_price_increase", "refunded_due_to_app_issue", "refunded_for_other_reason", "merchant_revoked" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "id", "item_id_at_source" ], "example" : null }, "OmnichannelOneTimeOrderItemCancelledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_one_time_order" : { "$ref" : "#/components/schemas/OmnichannelOneTimeOrder" }, "omnichannel_one_time_order_item" : { "$ref" : "#/components/schemas/OmnichannelOneTimeOrderItem" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_one_time_order", "omnichannel_one_time_order_item", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscription" : { "type" : "object", "description" : "This resource unifies representation of the subscription data across multiple [sources](/docs/api/omnichannel_subscriptions/omnichannel_subscription-object#source)\n, such as the Apple App Store and Google Play Store. It provides one-to-one mapping of underlying data into Chargebee's omnichannel format. Acting as a **middleware**\n, the solution delivers data in a unified format as it is presented. \n**Note:**\nThis resource represents in-app subscriptions made on Apple App Store and Google Play Store.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The ID generated by Chargebee for the recorded subscription purchase.\n", "maxLength" : 50, "example" : null }, "id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the subscription in the source.\nFor Apple App Store, it is the Transaction ID\nof the initial_purchase_transaction\n.

", "maxLength" : 500, "example" : null }, "app_id" : { "type" : "string", "deprecated" : false, "description" : "

App Identifier in Chargebee. This is the handle created by Chargebee for your app. To get the app_id:

\n", "maxLength" : 100, "example" : null }, "source" : { "type" : "string", "deprecated" : false, "description" : "

The source\nwhere the purchase is originally made and managed.

\n* google_play_store -

When source of the application is Google Play Store

\n* apple_app_store -

When source of the application is Apple App Store

", "enum" : [ "apple_app_store", "google_play_store" ], "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer\nobject that is associated with this purchase.

", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the omnichannel_subscription\ncreated in Chargebee.

", "example" : null }, "purchased_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Timestamp (UTC) when the subscription was originally purchased in the app marketplace (initial purchase). This corresponds to the time of the initial purchase transaction in the source\n.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the omnichannel_subscription was last updated\n.

", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null }, "omnichannel_subscription_items" : { "type" : "array", "deprecated" : false, "description" : "Items associated with the omnichannel_subscription.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Uniquely identifies a omnichannel_subscription_item\n.

", "maxLength" : 40, "example" : null }, "item_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

Product ID in the source\n.

", "maxLength" : 100, "example" : null }, "item_parent_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

The parent name of the product ID in the source\n.

", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Status of the omnichannel_subscription_item.\nLearn more\nabout status and their mapping with the store's status.

\n* active -

When the subscription associated with the omnichannel_subscription_item\nis active

\n* in_dunning -

When the subscription associated with the omnichannel_subscription_item\nis in_dunning\n.

\n* expired -

When the subscription associated with the omnichannel_subscription_item\nis expired

\n* cancelled -

When the subscription associated with the omnichannel_subscription_item\nis cancelled

\n* in_grace_period -

When the subscription associated with the omnichannel_subscription_item\nis in_grace_period\n.

\n* paused -

When the subscription associated with the omnichannel_subscription_item\nis paused\n.

", "enum" : [ "active", "expired", "cancelled", "in_dunning", "in_grace_period", "paused" ], "example" : null }, "auto_renew_status" : { "type" : "string", "deprecated" : false, "description" : "

The renewal status for the omnichannel_subscription_item\n.

\n* off -

The auto-renewal of omnichannel_subscription_item\nis disabled.

\n* on -

The auto-renewal of omnichannel_subscription_item\nis enabled.

", "enum" : [ "off", "on" ], "example" : null }, "current_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Start of the current billing period of the subscription item. It is applicable only if the status\nis active\n.

", "example" : null }, "current_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

End of the current billing period of the subscription item. It is applicable only if the status\nis active.

\n
\n

Note:\nThis timestamp can be considered closest to the next_billing_at\ntimestamp as Apple does not provide information on the next renewal. Apple can renew the subscription 24 hours before it expires, and after entering the billing retry state, it can attempt to renew the subscription for up to 60 days. Learn more\n.

\n
", "example" : null }, "expired_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the subscription associated with the omnichannel_subscription_item\nwas expired\nin the source

", "example" : null }, "expiration_reason" : { "type" : "string", "deprecated" : false, "description" : "Specifies the reason for the subscription expiration.\n\\* product_not_available -\n\nIndicates that the product was unavailable for purchase at the time of renewal.\n\\* other -\n\nIndicates that the subscription associated with the item expired for an unspecified reason.\n\\* billing_error -\n\nIndicates a billing error, such as the customer's payment information being invalid.\n", "enum" : [ "billing_error", "product_not_available", "other" ], "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the subscription associated with the omnichannel_subscription_item\nwas cancelled\nin the source

", "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "The reason of canceling the subscription.\n\\* customer_did_not_consent_to_price_increase -\n\nIndicates that the customer did not consent to the price increase for the subscription item.\n\\* merchant_revoked -\n\nIndicates that the merchant revoked access to the subscription.\n\\* customer_cancelled -\n\nIndicates that the subscription was voluntarily cancelled by the customer.\n\\* refunded_for_other_reason -\n\nIndicates that the subscription was cancelled and refunded for another reason.\n\\* refunded_due_to_app_issue -\n\nIndicates that the subscription was cancelled and refunded due to the app issue.\n", "enum" : [ "customer_cancelled", "customer_did_not_consent_to_price_increase", "refunded_due_to_app_issue", "refunded_for_other_reason", "merchant_revoked" ], "example" : null }, "grace_period_expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the grace period of subscription associated with the omnichannel_subscription_item\nexpires in the source

", "example" : null }, "resumes_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the subscription automatically resumes after being set to paused\n.

", "example" : null }, "has_scheduled_changes" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Indicates whether the omnichannel_subscription_item\nhas any scheduled changes.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the omnichannel_subscription_item\nwas last updated in Chargebee.

", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null }, "omnichannel_subscription_item_offers" : { "type" : "array", "deprecated" : false, "description" : "

Represents the omnichannel_subscription_item_offers\nassociated with the omnichannel_subscription_item\n.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Unique identifier for the omnichannel_subscription_item_offer.\nSystem-generated.

", "maxLength" : 40, "example" : null }, "offer_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the offer on the source platform (for example, Apple App Store or Google Play Store). Used to map Chargebee's record to the source.\n", "maxLength" : 100, "example" : null }, "category" : { "type" : "string", "deprecated" : false, "description" : "

Indicates functional purpose of the offer. For example, introductory\nindicates a first-time offer for new subscribers.

\n* introductory -

Introductory offer for first-time subscribers, typically providing special pricing or terms for the first billing cycle.

\n* promotional -

Promotional offer that may be available to both new and existing subscribers, often featuring limited-time pricing or terms.

\n* developer_determined -

Offer terms are determined by the developer and may include unique pricing or features.\nNote: Support for this category is planned for a future update.

", "enum" : [ "introductory", "promotional", "developer_determined" ], "example" : null }, "category_at_source" : { "type" : "string", "deprecated" : false, "description" : "Category label as defined by the source platform (for example, Apple App Store or Google Play Store). Directly fetched from the source; useful for debugging or platform-specific workflows.\n", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Indicates how the offer is applied from a pricing-model perspective.\n\\* free_trial -\n\nProvides a free trial period. The customer is not charged during the trial; regular billing begins after the trial ends.\n\\* pay_up_front -\n\nRequires a fixed upfront payment for a defined subscription period, often at a discount. For example, pay for two months in advance.\n\\* pay_as_you_go -\n\nApplies a recurring discounted price at each billing cycle over multiple renewals, such as on a monthly plan, a discount on the initial purchase, and the next three billing cycles.\n", "enum" : [ "free_trial", "pay_up_front", "pay_as_you_go" ], "example" : null }, "type_at_source" : { "type" : "string", "deprecated" : false, "description" : "

Offer type as recorded by the source platform (for example, Apple App Store or Google Play Store), such as category_at_source is useful for tracking and audit.

", "maxLength" : 100, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "Discount strategy: percentage discount, fixed amount off, or fixed price override.\n\\* percentage -\n\nApplies a percentage discount on the original price of the subscription item. For example, 20% off.\n\\* fixed_amount -\n\nDiscount that subtracts a fixed amount from the original price of the subscription item.\n\\* price -\n\nOverrides the original price with a fixed discounted price for the offer term. For example, set the price to $9.99 during the offer.\n", "enum" : [ "fixed_amount", "percentage", "price" ], "example" : null }, "duration" : { "type" : "string", "deprecated" : false, "description" : "

Indicates how long the offer applies to the subscription. This attribute uses ISO 8601 duration format. For example, P1M\n(1 month), P7D\n(7 days). After this duration, regular pricing resumes.

", "maxLength" : 5, "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "

Used when discount_type\nis percentage.\nSpecifies the discount as a decimal value. For example, a value of 12.5 corresponds to a 12.5% discount.

", "maximum" : 100, "minimum" : 0.01, "example" : null }, "price_currency" : { "type" : "string", "deprecated" : false, "description" : "Three-letter [ISO 4217](https://www.chargebee.com/docs/billing/2.0/site-configuration/supported-currencies)\ncurrency code for the offer price (for example, USD, EUR, INR).\n", "maxLength" : 3, "example" : null }, "price_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Whole-unit portion of the offer amount (for example,10 for $10.00).\n**Note:** Depending on the discount type, this value can represent different meanings. For a fixed_amountdiscount, it indicates the amount deducted from the original price, while for aprice discount, it reflects the final amount payable by the customer.\n", "example" : null }, "price_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Fractional part of the offer amount, expressed in nanos (billionths of the currency unit). For example, 500000000represents 0.50. Combine withprice_units to determine the total price (for example, $10.50).\n**Note:** Depending on the discount type, this value can represent different meanings. For a fixed_amountdiscount, it indicates the amount deducted from the original price, while for aprice discount, it reflects the final amount payable by the customer.\n", "example" : null }, "offer_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the offer becomes effective for the subscription item. It is typically set to the time when the offer is first applied or activated.\n", "example" : null }, "offer_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the offer becomes invalid. After this time, regular pricing or terms apply to the subscription item.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null } }, "required" : [ "category", "duration", "id", "type" ], "example" : null }, "example" : null }, "upcoming_renewal" : { "type" : "object", "deprecated" : false, "description" : "

This field contains information about the upcoming renewal. It is present only if the source\nprovides renewal information (currently available only for Google Play Store purchases) and the omnichannel_subscription_item\n's auto_renew_status\nis set to on\nto renew for the next term. Otherwise, this field is absent.

", "properties" : { "price_currency" : { "type" : "string", "deprecated" : false, "description" : "The three-letter [ISO 4217](https://www.chargebee.com/docs/supported-currencies.html)\ncurrency code in which the next renewal is set to occur\n", "maxLength" : 3, "example" : null }, "price_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The whole units of the amount.\nFor example:\nif currencyCode is USD (i.e. two decimal currency), then the unit value for USD 1.23 will be 1\nif currencyCode is JPY (i.e. zero decimal currency), then the unit value for JPY 123 will be 123\nif currencyCode is BHD (i.e. three decimal currency), then the unit value for BHD 1.234 will be 1

", "example" : null }, "price_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The fractional price amount, in nanos (billionths of the currency unit), for the next renewal.\nThe value must be between 0 and +999,999,999 inclusive.\nFor example:\nIf currencyCode is USD (i.e. two decimal currency), then nanos value for USD 1.23 will be 230,000,000\nIf currencyCode is JPY (i.e. zero decimal currency), then nanos value for JPY 123 will be 0\nIf currencyCode is BHD (i.e. three decimal currency), then nanos value for BHD 1.234 will be 234,000,000

", "example" : null } }, "example" : null }, "linked_item" : { "type" : "object", "deprecated" : false, "description" : "

Represents an active product catalog mapping between an omnichannel_subscription_item\nand a Chargebee item.\nUse this attribute to retrieve entitlements for the omnichannel_subscription_item\nthat are associated with the linked Chargebee item\n.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Represents the item_id\nof the Chargebee item linked to the omnichannel_subscription_item\n.

", "maxLength" : 100, "example" : null }, "linked_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates the timestamp when the mapping between the omnichannel_subscription_item\nand the Chargebee item\nwas created in Chargebee.

", "example" : null } }, "required" : [ "id" ], "example" : null } }, "required" : [ "has_scheduled_changes", "id", "item_id_at_source", "status", "updated_at" ], "example" : null }, "example" : null }, "initial_purchase_transaction" : { "type" : "object", "deprecated" : false, "description" : "Refers to the record created when a customer makes their first purchase.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique ID of a omnichannel transaction\n", "maxLength" : 40, "example" : null }, "id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the subscription in the source.\nFor Apple App Store, it is the Transaction ID\nof the initial_purchase_transaction.\nFor Google Play Store, it is the Order ID\nof the initial_purchase_transaction\n.

", "maxLength" : 100, "example" : null }, "app_id" : { "type" : "string", "deprecated" : false, "description" : "

App Identifier in Chargebee. This is the handle created by Chargebee for your app. To get the app_id:

\n", "maxLength" : 100, "example" : null }, "price_currency" : { "type" : "string", "deprecated" : false, "description" : "The currency code for the transaction\n", "maxLength" : 3, "example" : null }, "price_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The whole units of the amount.\nFor example:\nif currencyCode is USD (i.e. two decimal currency), then the unit value for USD 1.23 will be 1\nif currencyCode is JPY (i.e. zero decimal currency), then the unit value for JPY 123 will be 123\nif currencyCode is BHD (i.e. three decimal currency), then the unit value for BHD 1.234 will be 1

", "example" : null }, "price_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The fractional price amount, in nanos (billionths of the currency unit), for the next renewal.\nThe value must be between 0 and +999,999,999 inclusive.\nFor example:\nIf currencyCode is USD (i.e. two decimal currency), then nanos value for USD 1.23 will be 230,000,000\nIf currencyCode is JPY (i.e. zero decimal currency), then nanos value for JPY 123 will be 0\nIf currencyCode is BHD (i.e. three decimal currency), then nanos value for BHD 1.234 will be 234,000,000

", "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Omnichannel subscription transaction type that describes the transaction\n\\* renewal -\n\nIndicates that the transaction was initiated as part of a renewal for a previously completed purchase.\n\\* purchase -\n\nIndicates that the transaction occurred for a purchase.\n", "enum" : [ "purchase", "renewal" ], "example" : null }, "transacted_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Timestamp denoting the time when the transaction occurred in source

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The timestamp of transaction creation\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "linked_omnichannel_subscriptions" : { "type" : "array", "deprecated" : false, "description" : "

A list of omnichannel_subscription\nobjects linked to this transaction. Each entry represents a subscription associated with the initial purchase transaction.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "omnichannel_subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the associated omnichannel subscription.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null }, "linked_omnichannel_one_time_orders" : { "type" : "array", "deprecated" : false, "description" : "

A list of omnichannel_one_time_order\nobjects linked to this transaction. Each entry represents a one-time order associated with the initial purchase transaction.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "omnichannel_one_time_order_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the associated omnichannel one-time order.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null } }, "required" : [ "app_id", "created_at", "id", "id_at_source", "type" ], "example" : null } }, "required" : [ "app_id", "created_at", "id", "id_at_source", "omnichannel_subscription_items", "source", "updated_at" ], "example" : null }, "OmnichannelSubscriptionCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionImportedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "omnichannel_subscription_item_scheduled_change" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChange" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_subscription_item_scheduled_change", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItem" : { "type" : "object", "description" : "This resource unifies representation of a Subscription item across multiple source. \n**Note:**\nThis resource represents in-app subscriptions made on Apple App Store and Google Play Store.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Uniquely identifies a omnichannel_subscription_item\n.

", "maxLength" : 40, "example" : null }, "item_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

Product ID in the source\n.

", "maxLength" : 100, "example" : null }, "item_parent_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

The parent name of the product ID in the source\n.

", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Status of the omnichannel_subscription_item.\nLearn more\nabout status and their mapping with the store's status.

\n* in_grace_period -

When the subscription associated with the omnichannel_subscription_item\nis in_grace_period

\n* in_dunning -

When the subscription associated with the omnichannel_subscription_item\nis in_dunning

\n* expired -

When the subscription associated with the omnichannel_subscription_item\nis expired

\n* active -

When the subscription associated with the omnichannel_subscription_item\nis active

\n* cancelled -

When the subscription associated with the omnichannel_subscription_item\nis cancelled

\n* paused -

When the subscription associated with the omnichannel_subscription_item\nis paused

", "enum" : [ "active", "expired", "cancelled", "in_dunning", "in_grace_period", "paused" ], "example" : null }, "auto_renew_status" : { "type" : "string", "deprecated" : false, "description" : "

The renewal status for the omnichannel_subscription_item\n.

\n* on -

The auto-renewal of omnichannel_subscription_item\nis enabled.

\n* off -

The auto-renewal of omnichannel_subscription_item\nis disabled.

", "enum" : [ "off", "on" ], "example" : null }, "current_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Start of the current billing period of the subscription item. It is applicable only if the status\nis active\n.

", "example" : null }, "current_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

End of the current billing period of the subscription item. It is applicable only if the status\nis active\n.

", "example" : null }, "expired_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the subscription associated with the omnichannel_subscription_item\nwas expired\nin the source

", "example" : null }, "expiration_reason" : { "type" : "string", "deprecated" : false, "description" : "Specifies the reason for the subscription expiration.\n\\* other -\n\nIndicates that the subscription associated with the item expired for an unspecified reason.\n\\* product_not_available -\n\nIndicates that the product was unavailable for purchase at the time of renewal.\n\\* billing_error -\n\nIndicates a billing error, such as the customer's payment information being invalid.\n", "enum" : [ "billing_error", "product_not_available", "other" ], "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the subscription associated with the omnichannel_subscription_item\nwas cancelled\nin the source

", "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "The reason of canceling the subscription.\n\\* refunded_for_other_reason -\n\nIndicates that the subscription was cancelled and refunded for another reason.\n\\* refunded_due_to_app_issue -\n\nIndicates that the subscription was cancelled and refunded due to the app issue.\n\\* customer_did_not_consent_to_price_increase -\n\nIndicates that the customer did not consent to the price increase for the subscription item.\n\\* customer_cancelled -\n\nIndicates that the subscription was voluntarily cancelled by the customer.\n\\* merchant_revoked -\n\nIndicates that the merchant revoked access to the subscription.\n", "enum" : [ "customer_cancelled", "customer_did_not_consent_to_price_increase", "refunded_due_to_app_issue", "refunded_for_other_reason", "merchant_revoked" ], "example" : null }, "grace_period_expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the grace period of subscription associated with the omnichannel_subscription_item\nexpires in the source

", "example" : null }, "resumes_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the subscription automatically resumes after being set to paused\n.

", "example" : null }, "has_scheduled_changes" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Indicates whether the omnichannel_subscription_item\nhas any scheduled changes.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null }, "omnichannel_subscription_item_offers" : { "type" : "array", "deprecated" : false, "description" : "

Represents the omnichannel_subscription_item_offers\nassociated with the omnichannel_subscription_item\n.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Unique identifier for the omnichannel_subscription_item_offer.\nSystem-generated.

", "maxLength" : 40, "example" : null }, "offer_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the offer on the source platform (for example, Apple App Store or Google Play Store). Used to map Chargebee's record to the source.\n", "maxLength" : 100, "example" : null }, "category" : { "type" : "string", "deprecated" : false, "description" : "

Indicates functional purpose of the offer. For example, introductory\nindicates a first-time offer for new subscribers.

\n* developer_determined -

Offer terms are determined by the developer and may include unique pricing or features.\nNote: Support for this category is planned for a future update.

\n* promotional -

Promotional offer that may be available to both new and existing subscribers, often featuring limited-time pricing or terms.

\n* introductory -

Introductory offer for first-time subscribers, typically providing special pricing or terms for the first billing cycle.

", "enum" : [ "introductory", "promotional", "developer_determined" ], "example" : null }, "category_at_source" : { "type" : "string", "deprecated" : false, "description" : "Category label as defined by the source platform (for example, Apple App Store or Google Play Store). Directly fetched from the source; useful for debugging or platform-specific workflows.\n", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Indicates how the offer is applied from a pricing-model perspective.\n\\* pay_as_you_go -\n\nApplies a recurring discounted price at each billing cycle over multiple renewals, such as on a monthly plan, a discount on the initial purchase, and the next three billing cycles.\n\\* free_trial -\n\nProvides a free trial period. The customer is not charged during the trial; regular billing begins after the trial ends.\n\\* pay_up_front -\n\nRequires a fixed upfront payment for a defined subscription period, often at a discount. For example, pay for two months in advance.\n", "enum" : [ "free_trial", "pay_up_front", "pay_as_you_go" ], "example" : null }, "type_at_source" : { "type" : "string", "deprecated" : false, "description" : "

Offer type as recorded by the source platform (for example, Apple App Store or Google Play Store), such as category_at_source is useful for tracking and audit.

", "maxLength" : 100, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "Discount strategy: percentage discount, fixed amount off, or fixed price override.\n\\* fixed_amount -\n\nDiscount that subtracts a fixed amount from the original price of the subscription item.\n\\* percentage -\n\nApplies a percentage discount on the original price of the subscription item. For example, 20% off.\n\\* price -\n\nOverrides the original price with a fixed discounted price for the offer term. For example, set the price to $9.99 during the offer.\n", "enum" : [ "fixed_amount", "percentage", "price" ], "example" : null }, "duration" : { "type" : "string", "deprecated" : false, "description" : "

Indicates how long the offer applies to the subscription. This attribute uses ISO 8601 duration format. For example, P1M\n(1 month), P7D\n(7 days). After this duration, regular pricing resumes.

", "maxLength" : 5, "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "

Used when discount_type\nis percentage.\nSpecifies the discount as a decimal value. For example, a value of 12.5 corresponds to a 12.5% discount.

", "maximum" : 100, "minimum" : 0.01, "example" : null }, "price_currency" : { "type" : "string", "deprecated" : false, "description" : "Three-letter [ISO 4217](https://www.chargebee.com/docs/billing/2.0/site-configuration/supported-currencies)\ncurrency code for the offer price (for example, USD, EUR, INR).\n", "maxLength" : 3, "example" : null }, "price_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Whole-unit portion of the offer amount (for example,10 for $10.00).\n**Note:** Depending on the discount type, this value can represent different meanings. For a fixed_amountdiscount, it indicates the amount deducted from the original price, while for a price discount, it reflects the final amount payable by the customer.\n", "example" : null }, "price_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Fractional part of the offer amount, expressed in nanos (billionths of the currency unit). For example, 500000000represents 0.50. Combine withprice_units to determine the total price (for example, $10.50).\n**Note:** Depending on the discount type, this value can represent different meanings. For a fixed_amountdiscount, it indicates the amount deducted from the original price, while for a price discount, it reflects the final amount payable by the customer.\n", "example" : null }, "offer_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the offer becomes effective for the subscription item. It is typically set to the time when the offer is first applied or activated.\n", "example" : null }, "offer_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the offer becomes invalid. After this time, regular pricing or terms apply to the subscription item.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null } }, "required" : [ "category", "duration", "id", "type" ], "example" : null }, "example" : null }, "upcoming_renewal" : { "type" : "object", "deprecated" : false, "description" : "

This field contains information about the upcoming renewal. It is present only if the source\nprovides renewal information (currently available only for Google Play Store purchases) and the omnichannel_subscription_item\n's auto_renew_status\nis set to on\nto renew for the next term. Otherwise, this field is absent.

", "properties" : { "price_currency" : { "type" : "string", "deprecated" : false, "description" : "The three-letter [ISO 4217](https://www.chargebee.com/docs/supported-currencies.html) currency code in which the next renewal is set to occur\n", "maxLength" : 3, "example" : null }, "price_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The whole units of the amount.\nFor example:\nif currencyCode is USD (i.e. two decimal currency), then the unit value for USD 1.23 will be 1\nif currencyCode is JPY (i.e. zero decimal currency), then the unit value for JPY 123 will be 123\nif currencyCode is BHD (i.e. three decimal currency), then the unit value for BHD 1.234 will be 1

", "example" : null }, "price_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The fractional price amount, in nanos (billionths of the currency unit), for the next renewal.\nThe value must be between 0 and +999,999,999 inclusive.\nFor example:\nIf currencyCode is USD (i.e. two decimal currency), then nanos value for USD 1.23 will be 230,000,000\nIf currencyCode is JPY (i.e. zero decimal currency), then nanos value for JPY 123 will be 0\nIf currencyCode is BHD (i.e. three decimal currency), then nanos value for BHD 1.234 will be 234,000,000

", "example" : null } }, "example" : null }, "linked_item" : { "type" : "object", "deprecated" : false, "description" : "

Represents an active product catalog mapping between an omnichannel_subscription_item\nand a Chargebee item.\nUse this attribute to retrieve entitlements for the omnichannel_subscription_item\nthat are associated with the linked Chargebee item\n.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Represents the item_id\nof the Chargebee item linked to the omnichannel_subscription_item\n.

", "maxLength" : 100, "example" : null }, "linked_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates the timestamp when the mapping between the omnichannel_subscription_item\nand the Chargebee item\nwas created in Chargebee.

", "example" : null } }, "required" : [ "id" ], "example" : null } }, "required" : [ "has_scheduled_changes", "id", "item_id_at_source", "status", "updated_at" ], "example" : null }, "OmnichannelSubscriptionItemCancellationScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemCancelledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemChangeScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription_item_scheduled_change" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChange" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription_item", "omnichannel_subscription_item_scheduled_change" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemChangedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "omnichannel_subscription_item_scheduled_change" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChange" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_subscription_item_scheduled_change", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemDowngradeScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemDowngradedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemDunningExpiredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemDunningStartedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemExpiredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemGracePeriodExpiredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemGracePeriodStartedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemMetric" : { "type" : "object", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "omnichannel_subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "omnichannel_subscription_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "item_id_at_source" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "mrr_currency" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "mrr_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "mrr_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "effective_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "calculated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "effective_from", "item_id_at_source" ], "example" : null }, "OmnichannelSubscriptionItemMrrUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item_metric" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemMetric" } }, "required" : [ "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_subscription_item_metric" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemOffer" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "offer_id_at_source" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "category" : { "type" : "string", "deprecated" : false, "enum" : [ "introductory", "promotional", "developer_determined" ], "example" : null }, "category_at_source" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "enum" : [ "free_trial", "pay_up_front", "pay_as_you_go" ], "example" : null }, "type_at_source" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "enum" : [ "fixed_amount", "percentage", "price" ], "example" : null }, "duration" : { "type" : "string", "deprecated" : false, "maxLength" : 5, "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "maximum" : 100, "minimum" : 0.01, "example" : null }, "price_currency" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "price_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "price_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "offer_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "offer_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null } }, "required" : [ "category", "duration", "id", "type" ], "example" : null }, "OmnichannelSubscriptionItemPauseScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription_item_scheduled_change" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChange" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription_item", "omnichannel_subscription_item_scheduled_change" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemPausedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemReactivatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemRecoveredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemRenewedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemResubscribedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "omnichannel_subscription_item_scheduled_change" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChange" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_subscription_item_scheduled_change", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemResumedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemScheduledCancellationRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemScheduledChange" : { "type" : "object", "description" : "This resource represents any scheduled changes related to an [Omnichannel subscription item](/docs/api/omnichannel_subscription_items)\n.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

Uniquely identifies an omnichannel_subscription_item_scheduled_change\n.

", "maxLength" : 40, "example" : null }, "omnichannel_subscription_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the Omnichannel subscription item\nobject associated with this scheduled change.

", "maxLength" : 100, "example" : null }, "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

When a change to the omnichannel_subscription_item\nis scheduled, this is the date and time when it takes effect.

", "example" : null }, "change_type" : { "type" : "string", "deprecated" : false, "description" : "

Indicates the type of scheduled change.

\n* downgrade -

The scheduled change type is downgrade

", "enum" : [ "downgrade", "pause" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the omnichannel_subscription_item_scheduled_change\nwas created in Chargebee.

", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null }, "current_state" : { "type" : "object", "deprecated" : false, "description" : "The current state of the attributes before the scheduled change takes effect.\n", "properties" : { "item_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

Applicable only if change_type\nis downgrade\n.

", "maxLength" : 100, "example" : null } }, "example" : null }, "scheduled_state" : { "type" : "object", "deprecated" : false, "description" : "The scheduled state of the attributes for which the change is scheduled.\n", "properties" : { "item_id_at_source" : { "type" : "string", "deprecated" : false, "description" : "

Applicable only if change_type\nis downgrade\n.

", "maxLength" : 100, "example" : null } }, "example" : null } }, "required" : [ "change_type", "created_at", "modified_at", "scheduled_at" ], "example" : null }, "OmnichannelSubscriptionItemScheduledChangeRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription_item_scheduled_change" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChange" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription_item", "omnichannel_subscription_item_scheduled_change" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemScheduledDowngradeRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionItemUpgradedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription_item" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItem" }, "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" }, "omnichannel_subscription_item_scheduled_change" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChange" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription", "omnichannel_subscription_item", "omnichannel_subscription_item_scheduled_change", "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelSubscriptionMovedInEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_subscription" : { "$ref" : "#/components/schemas/OmnichannelSubscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "omnichannel_subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OmnichannelTransaction" : { "type" : "object", "description" : "A unified representation of Transaction across multiple source.\n\n### Apple App Store\n\nThe [price](https://developer.apple.com/documentation/appstoreservernotifications/price) value reflects the price you configured in App Store Connect, which the system records at the time of transaction ([transacted_at](/docs/api/omnichannel_transactions/omnichannel_transaction-object#transacted_at)) after the discount if any offers are applied. \n**Important**\nFor financial and accounting purposes, use the App Store Connect reporting tools. For more information, see [Download financial reports](https://developer.apple.com/help/app-store-connect/getting-paid/download-financial-reports) and [Overview of reporting tools](https://developer.apple.com/help/app-store-connect/measure-app-performance/overview-of-reporting-tools).\n[Learn more](https://developer.apple.com/documentation/appstoreservernotifications/price) about price in Apple App Store.\n\n### Google Play Store\n\nThe Google Play Store does not provide the transaction amount or the purchase time. As a result, the system does not record the price value or time of the transaction([transacted_at](/docs/api/omnichannel_transactions/omnichannel_transaction-object#transacted_at)).\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The ID generated by Chargebee for the recorded purchase.\n", "maxLength" : 40, "example" : null }, "id_at_source" : { "type" : "string", "deprecated" : false, "description" : "The id of the transaction in the 'source'. For Apple App Store, it is the 'Transaction ID' of the initial subscription purchase transaction\n", "maxLength" : 100, "example" : null }, "app_id" : { "type" : "string", "deprecated" : false, "description" : "

App Identifier in Chargebee. This is the handle created by Chargebee for your app. To get the app_id:

\n", "maxLength" : 100, "example" : null }, "price_currency" : { "type" : "string", "deprecated" : false, "description" : "The three-letter ISO 4217 currency code associated with the transaction\n", "maxLength" : 3, "example" : null }, "price_units" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The whole units of the amount.\nFor example:\nif currencyCode is USD (i.e. two decimal currency), then the unit value for USD 1.23 will be 1\nif currencyCode is JPY (i.e. zero decimal currency), then the unit value for JPY 123 will be 123\nif currencyCode is BHD (i.e. three decimal currency), then the unit value for BHD 1.234 will be 1

", "example" : null }, "price_nanos" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The fraction part of the amount.\nThe value must be between 0 and +999,999,999 inclusive.\nFor example:\nIf currencyCode is USD (i.e. two decimal currency), then nanos value for USD 1.23 will be 230,000,000\nIf currencyCode is JPY (i.e. zero decimal currency), then nanos value for JPY 123 will be 0\nIf currencyCode is BHD (i.e. three decimal currency), then nanos value for BHD 1.234 will be 234,000,000

", "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Omni-subscription transaction type that describes the transaction\n\\* renewal -\n\nIndicates that the transaction was initiated as part of a renewal for a previously completed purchase.\n\\* purchase -\n\nIndicates that the transaction occurred for a purchase.\n", "enum" : [ "purchase", "renewal" ], "example" : null }, "transacted_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp denoting the time when the transaction occurred in Source\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Omnichannel Transaction created time\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null }, "linked_omnichannel_subscriptions" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "omnichannel_subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null }, "linked_omnichannel_one_time_orders" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "omnichannel_one_time_order_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null } }, "required" : [ "app_id", "created_at", "id", "id_at_source", "type" ], "example" : null }, "OmnichannelTransactionCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "omnichannel_transaction" : { "$ref" : "#/components/schemas/OmnichannelTransaction" } }, "required" : [ "omnichannel_transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OnEvent" : { "type" : "string", "deprecated" : false, "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "Operation" : { "type" : "string", "deprecated" : false, "enum" : [ "create", "update", "delete" ], "example" : null }, "OperationType" : { "type" : "string", "deprecated" : false, "enum" : [ "add", "remove" ], "example" : null }, "Order" : { "type" : "object", "description" : "**Note:**\nThis doc is for the latest version of Chargebee Orders. If you enabled Chargebee Orders before *September-30-2018*\n, you may be using the legacy version of the feature and its API. For help in migrating to the current system or using the legacy API for Chargebee Orders, please [contact support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n\nOrders are automatically generated for an invoice when it gets paid, based on the shipping preference chosen for the invoice's product and the shipping date configuration. They can be updated either via api or merchant web console (a.k.a admin console).\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the order. It is the api identifier for the order\n", "maxLength" : 40, "example" : null }, "document_number" : { "type" : "string", "deprecated" : false, "description" : "The order's serial number\n", "maxLength" : 50, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The invoice number which acts as an identifier for invoice and is generated sequentially.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The subscription for which the order is created\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The customer for which the order is created\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "new", "deprecated" : false, "description" : "The status of this order.\n\\* complete -\n\nOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n\\* partially_delivered -\n\nThe order has been partially delivered to the customer.\n\\* voided -\n\nOrder has been voided. Applicable only if you are using Chargebee's legacy order management system\n\\* on_hold -\n\nThe order is paused from being processed.\n\\* awaiting_shipment -\n\nThe order has been picked up by an integration system, and synced to a shipping management platform\n\\* shipped -\n\nThe order has moved from order management system to a shipping system.\n\\* queued -\n\nOrder is yet to be processed by any system, these are scheduled orders created by Chargebee\n\\* new -\n\nOrder has been created. Applicable only if you are using Chargebee's legacy order management system.\n\\* returned -\n\nThe order has been returned after delivery.\n\\* delivered -\n\nThe order has been delivered to the customer.\n\\* cancelled -\n\nOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n\\* processing -\n\nOrder is being processed. Applicable only if you are using Chargebee's legacy order management system\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "Cancellation reason\n\\* payment_declined -\n\nPayment declined.\n\\* shipping_cut_off_passed -\n\nThe invoice has been paid late and Chargebee cancel's the first order for the invoice.\n\\* product_not_available -\n\nProduct not available.\n\\* alternative_found -\n\nAlternative found.\n\\* others -\n\nOther reason\n\\* order_resent -\n\nOrder resent\n\\* product_unsatisfactory -\n\nProduct unsatisfactory.\n\\* delivery_date_missed -\n\nDelivery date missed.\n\\* fraudulent_transaction -\n\nFraudulent transaction.\n\\* invoice_voided -\n\nThe invoice for which the order was createed has been voided.\n\\* subscription_cancelled -\n\nThe subsctiption for which the order was created has been cancelled.\n\\* invoice_written_off -\n\nThe invoice has been completely written off. Orders are generated by Chargebee in cancelled state.\n\\* product_not_required -\n\nProduct not required.\n\\* third_party_cancellation -\n\nThird party cancellation.\n", "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" ], "example" : null }, "payment_status" : { "type" : "string", "deprecated" : false, "description" : "The payment status of the order\n\\* paid -\n\nPAID\n\\* not_paid -\n\nNOT_PAID\n", "enum" : [ "not_paid", "paid" ], "example" : null }, "order_type" : { "type" : "string", "deprecated" : false, "description" : "Order type\n\\* manual -\n\nThe order has been created by the user using Chargebee's legacy order management system.\n\\* system_generated -\n\nThe order has been created by Chargebee automatically based on the preferences set by the user.\n", "enum" : [ "manual", "system_generated" ], "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of the order\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 50, "example" : null }, "fulfillment_status" : { "type" : "string", "deprecated" : false, "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", "maxLength" : 50, "example" : null }, "order_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the order will start getting processed.\n", "example" : null }, "shipping_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "This is the date on which the order will be delivered to the customer.\n", "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "The custom note for the order.\n", "maxLength" : 600, "example" : null }, "tracking_id" : { "type" : "string", "deprecated" : false, "description" : "The tracking id of the order.\n", "maxLength" : 50, "example" : null }, "tracking_url" : { "type" : "string", "deprecated" : false, "description" : "The tracking url of the order.\n", "maxLength" : 255, "example" : null }, "batch_id" : { "type" : "string", "deprecated" : false, "description" : "Unique id to identify a group of orders.\n", "maxLength" : 50, "example" : null }, "created_by" : { "type" : "string", "deprecated" : false, "description" : "The source (or the user) from where the order has been created.\n", "maxLength" : 50, "example" : null }, "shipment_carrier" : { "type" : "string", "deprecated" : false, "description" : "Shipment carrier\n", "maxLength" : 50, "example" : null }, "invoice_round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total round off taken from the invoice level\n", "minimum" : 0, "example" : null }, "tax" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total tax for the order.\n", "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount paid for the order.\n", "minimum" : 0, "example" : null }, "amount_adjusted" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount adjusted for the order.\n", "minimum" : 0, "example" : null }, "refundable_credits_issued" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total amount issued as credits on behalf of this order.\n", "minimum" : 0, "example" : null }, "refundable_credits" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total amount that can be issued as credits for this order.\n", "minimum" : 0, "example" : null }, "rounding_adjustement" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Rounding adjustment\n", "example" : null }, "paid_on" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The timestamp indicating the date \\& time the order's invoice got paid.\n", "example" : null }, "shipping_cut_off_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time after which an order becomes unservicable\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was created\n", "example" : null }, "status_update_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order status was last updated.\n", "example" : null }, "delivered_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was delivered\n", "example" : null }, "shipped_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was shipped.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The order's last modified time.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was cancelled.\n", "example" : null }, "resent_status" : { "type" : "string", "deprecated" : false, "description" : "Resent status of the order.\n\\* fully_resent -\n\nOrder is Fully resent\n\\* partially_resent -\n\nOrder is Partially resent\n", "enum" : [ "fully_resent", "partially_resent" ], "example" : null }, "is_resent" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Show if the order is resent order or not.\n", "example" : null }, "original_order_id" : { "type" : "string", "deprecated" : false, "description" : "Refers to the original order id of the resent order.\n", "maxLength" : 40, "example" : null }, "discount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discount given for the order.\n", "minimum" : 0, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The order's sub-total\n", "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount charged for the order.\n", "minimum" : 0, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates that this resource has been deleted.\n", "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the invoice\n", "maxLength" : 3, "example" : null }, "is_gifted" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Boolean indicating whether this order is gifted or not.\n", "example" : null }, "gift_note" : { "type" : "string", "deprecated" : false, "description" : "The gift message added by the gifter during purchase\n", "maxLength" : 500, "example" : null }, "gift_id" : { "type" : "string", "deprecated" : false, "description" : "The gift_id if the order is a gift order\n", "maxLength" : 50, "example" : null }, "resend_reason" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive\n", "maxLength" : 100, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the\n[business entity](/docs/api/advanced-features)\nof this subscription. This is always the same as the\n[business entity](/docs/api/subscriptions/subscription-object#customer_id)\nof the customer.\n", "maxLength" : 50, "example" : null }, "order_line_items" : { "type" : "array", "deprecated" : false, "description" : "The list of line items for this order.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier for the order line item.\n", "maxLength" : 40, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The invoice of the line item.\n", "maxLength" : 50, "example" : null }, "invoice_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The invoice line item id associated with this order line item.\n", "maxLength" : 40, "example" : null }, "unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The unit price.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "The line item description.\n", "maxLength" : 250, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The sub total, of the order line item\n", "minimum" : 0, "example" : null }, "fulfillment_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The quantity that is going to get fulfilled for this order\n", "minimum" : 0, "example" : null }, "fulfillment_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount that is going to get fulfilled for this order(amount after tax and discount)\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total tax applied on this line item\n", "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total amount paid on the invoice, on behalf of this delivery\n", "minimum" : 0, "example" : null }, "amount_adjusted" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total amount adjusted on the invoice, on behalf of this delivery\n", "minimum" : 0, "example" : null }, "refundable_credits_issued" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total refundable credits issued on the invoice, on behalf of this delivery\n", "minimum" : 0, "example" : null }, "refundable_credits" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total amount issued as credits on behalf of this delivery\n", "minimum" : 0, "example" : null }, "is_shippable" : { "type" : "boolean", "deprecated" : false, "description" : "Appliable only if configured to include non shippable charges in orders, specifies if the charge is applicable for shipping\n", "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "description" : "The SKU for the delivery.\n", "maxLength" : 250, "example" : null }, "status" : { "type" : "string", "default" : "queued", "deprecated" : false, "description" : "The status of this order.\n\\* shipped -\n\nThe order line item has been shipped.\n\\* on_hold -\n\nThe delivery has been moved to \"On hold\" status.\n\\* cancelled -\n\nThe order has been returned after delivery.\n\\* returned -\n\nThe order has been returned after delivery.\n\\* partially_delivered -\n\nThe order has been partially delivered to the customer.\n\\* delivered -\n\nThe order line item has been delivered.\n\\* queued -\n\nNot processed for shipping yet.\n\\* awaiting_shipment -\n\nMoved to shipping platform.\n", "enum" : [ "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned", "cancelled" ], "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity ([plan](/docs/api/v2/pcv-1/plans/plan-object)\n/ [addon](/docs/api/v2/pcv-1/addons/addon-object)\netc) this line item is based on\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Item level discount amount\n", "minimum" : 0, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The discount given on the order line item.\n", "minimum" : 0, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this lineitem is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 50, "example" : null } }, "required" : [ "entity_type", "id", "invoice_id", "invoice_line_item_id", "is_shippable" ], "example" : null }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Shipping address for the order.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Billing address for the order.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on the order line items.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period end of the tax rate for the line item.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period start of the tax rate for the line item.\n", "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Indicates the prorated line item amount in cents.\n", "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount\n", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* state -\n\nThe tax jurisdiction is a state\n\\* county -\n\nThe tax jurisdiction is a county\n\\* country -\n\nThe tax jurisdiction is a country\n\\* city -\n\nThe tax jurisdiction is a city\n\\* special -\n\nSpecial tax jurisdiction.\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* other -\n\nJurisdictions other than the ones listed above.\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discounts applied for the order\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the discount is applicable.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

Type of this discount line item

\n* prorated_credits -

Represents the credit adjustment items in invoice. The 'coupon_id' attribute will be null in this case

\n* document_level_coupon -

Represents the 'Document' level coupons applied to this document. Further the 'coupon_id' attribute specifies the coupon\nid this discount is based on

\n* custom_discount -

Represents the discount applied on an resent order against the orginal order.

\n* promotional_credits -

Represents the Promotional Credits item in invoice. The 'coupon_id' attribute will be null in this case

\n* item_level_coupon -

Represents the 'Item' level coupons applied to this invoice. Further the 'coupon_id' attribute specifies the coupon\nid this discount is based on

\n* document_level_discount -

The deduction is due to a discount applied to the invoice sub_total.\nThe discount id is available as the entity_id.

\n\n* item_level_discount -

The deduction is due to a discount applied to a line item of the invoice. The discount id is available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "custom_discount", "item_level_discount", "document_level_discount" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Discount amount.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "linked_credit_notes" : { "type" : "array", "deprecated" : false, "description" : "The credit notes linked to the order\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount issued for this order\n", "minimum" : 0, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The credit note type. [Learn more](/docs/api/credit_notes/credit-note-object)\nabout credit note types.\n\\* store -\n\nStore Credit Note\n\\* refundable -\n\nRefundable Credit Note\n\\* adjustment -\n\nAdjustment Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Credit-note id.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The credit note status.\n\\* voided -\n\nWhen the Credit Note has been cancelled.\n\\* refunded -\n\nWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n\\* adjusted -\n\nWhen the Credit Note has been adjusted against an invoice.\n\\* refund_due -\n\nWhen the credits are yet to be used, or have been partially used.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "amount_adjusted" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount adjusted on the order for the linked credit note. Applicable if the linked credit note is of the type 'adjustement'\n", "minimum" : 0, "example" : null }, "amount_refunded" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total refundable credits issued on the order for the linked credit note. Applicable if the linked credit note is of the type 'refundable'\n", "minimum" : 0, "example" : null } }, "required" : [ "id", "status", "type" ], "example" : null }, "example" : null }, "resent_orders" : { "type" : "array", "deprecated" : false, "description" : "The list of resent orders applied on the order.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "order_id" : { "type" : "string", "deprecated" : false, "description" : "The order which is linked.\n", "maxLength" : 40, "example" : null }, "reason" : { "type" : "string", "deprecated" : false, "description" : "The order resent reason.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Value of the resent order.\n", "minimum" : 0, "example" : null } }, "required" : [ "order_id" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "deleted", "id", "is_resent", "price_type" ], "example" : null }, "OrderCancelledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OrderCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OrderDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OrderDeliveredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OrderReadyToProcessEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OrderReadyToShipEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OrderResentEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OrderReturnedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OrderUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order" } }, "required" : [ "order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "OverridesMetric" : { "type" : "object", "properties" : { "item_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan", "addon", "charge" ], "example" : null }, "total_overridden_item_count" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "total_overridden_count" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "last_updated_at" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null } }, "example" : null }, "PauseOption" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "end_of_term", "specific_date", "billing_cycles" ], "example" : null }, "PaymentDueReminderEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "customer", "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentFailedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer", "invoice", "subscription", "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentInitiatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer", "invoice", "subscription", "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentInitiator" : { "type" : "string", "deprecated" : false, "enum" : [ "customer", "merchant" ], "example" : null }, "PaymentIntent" : { "type" : "object", "description" : "

A payment_intent is created to help you navigate the 3DS flow of collecting payment from your customer. It is necessary only for implementing 3DS flow using Chargebee.js.

Auto-expiry

All payment_intents with status as inited, in_progress or authorized become expired after an hour automatically.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent.\n", "maxLength" : 150, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of PaymentIntent.\n\\* in_progress -\n\nStatus will be in_progress if the Active Payment Attempt state is in requires_identification, requires_challenge or requires_redirection.\n\\* inited -\n\nIntent is initialized.\n\\* authorized -\n\n3DS verification successfully completed.\n\\* consumed -\n\nIf any Chargebee operation such as create subscription etc. is completed using the intent, it will be in consumed state. Intent cannot be used if it's already in consumed state.\n\\* expired -\n\nIntent has expired, since it was not consumed before the predefined time-out.\n", "enum" : [ "inited", "in_progress", "authorized", "consumed", "expired" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the amount used in transaction.\n", "maxLength" : 3, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount(in cents) to be authorized for 3DS flow.\n", "minimum" : 0, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the PaymentIntent will expire if left unconsumed.\n", "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Reference for payment method at gateway. Only applicable when the PaymentIntent is created for cards stored in the gateway.\n", "maxLength" : 200, "example" : null }, "payment_method_type" : { "type" : "string", "default" : "card", "deprecated" : false, "description" : "The payment method of this intent\n\\* tamara -\n\nPayments made via Tamara.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* apple_pay -\n\napple_pay\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* venmo -\n\nVenmo\n\\* after_pay -\n\nPayments made via Afterpay\n\\* giropay -\n\ngiropay\n\\* dana -\n\nPayments made via Dana.\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* pix -\n\nPix\n\\* amazon_payments -\n\namazon_payments\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* card -\n\ncard\n\\* go_pay -\n\nPayments made via GoPay\n\\* google_pay -\n\ngoogle_pay\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* ideal -\n\nideal\n\\* dotpay -\n\ndotpay\n\\* sofort -\n\nsofort\n\\* gcash -\n\nPayments made via GCash.\n\\* faster_payments -\n\nFaster Payments\n\\* qpay -\n\nPayments made via Qpay.\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* klarna -\n\nPayments made via Klarna.\n\\* swish -\n\nPayments made via Swish\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* bancontact -\n\nbancontact\n\\* trustly -\n\nTrustly\n\\* paypay -\n\nPayPay\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* boleto -\n\nboleto\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* pay_by_bank -\n\nPay By Bank\n\\* payme -\n\nPayments made via PayMe\n\\* pay_co -\n\nPayments made via PayCo\n\\* pay_to -\n\nPayTo\n\\* alipay -\n\nPayments made via Alipay.\n\\* sepa_instant_transfer -\n\nSEPA Instant Transfer\n\\* direct_debit -\n\ndirect_debit\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* upi -\n\nupi\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* twint -\n\nPayments made via Twint\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "success_url" : { "type" : "string", "deprecated" : false, "description" : "

The URL the customer will be directed to once 3DS verification is successful. Applicable only when payment_method_type\nis ideal\n, sofort\n, dotpay\nor giropay\n.

", "maxLength" : 250, "example" : null }, "failure_url" : { "type" : "string", "deprecated" : false, "description" : "

The URL the customer will be directed to when 3DS verification fails. Applicable only when payment_method_type\nis ideal\n, sofort\n, dotpay\nor giropay\n.

", "maxLength" : 250, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the PaymentIntent was created.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the PaymentIntent was last modified.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this payment intent was last updated.\n", "example" : null }, "payment_method_options" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

Options used to process the payment method. This attribute is omitted when no preference is stored.

\n", "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the customer for whom the payment_intent will be created. If specified, the payment_intent will be used exclusively for that customer. If not specified, the payment_intent won't be associated with any customer and will be available for any customer.

\n

See also

Customer resource lookup and creation
", "maxLength" : 50, "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "Gateway associated with the PaymentIntent.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nof this payment_intent

\n", "maxLength" : 50, "example" : null }, "active_payment_attempt" : { "type" : "object", "deprecated" : false, "description" : "Active payment attempt for the PaymentIntent.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent's active payment attempt.\n", "maxLength" : 70, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of active payment attempt\n\\* requires_challenge -\n\nThe transaction has to go through 3DS Challenge flow and the customer needs to authenticate via 3DS 2.0\n\\* inited -\n\nPayment attempt is initialized.\n\\* requires_identification -\n\nCustomer's device fingerprint is used to verify their identity. It needs to be sent to the Issuing Bank for verification.\n\\* refused -\n\n3DS verification attempt failed.\n\\* authorized -\n\n3DS verification successfully completed.\n\\* pending_authorization -\n\nWaiting for the authorization.\n\\* requires_redirection -\n\nThe transaction has to go through 3DS Redirection flow and the customer needs to authenticate via 3DS 1.0\n", "enum" : [ "inited", "requires_identification", "requires_challenge", "requires_redirection", "authorized", "refused", "pending_authorization" ], "example" : null }, "payment_method_type" : { "type" : "string", "default" : "card", "deprecated" : false, "description" : "The payment method of this attempt\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* venmo -\n\nVenmo\n\\* sofort -\n\nsofort\n\\* alipay -\n\nPayments made via Alipay.\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* giropay -\n\ngiropay\n\\* dana -\n\nPayments made via Dana.\n\\* bancontact -\n\nbancontact\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* go_pay -\n\nPayments made via GoPay\n\\* card -\n\ncard\n\\* faster_payments -\n\nFaster Payments\n\\* paypay -\n\nPayPay\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* qpay -\n\nPayments made via Qpay.\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* ideal -\n\nideal\n\\* sepa_instant_transfer -\n\nSEPA Instant Transfer\n\\* gcash -\n\nPayments made via GCash.\n\\* pay_by_bank -\n\nPay By Bank\n\\* klarna -\n\nPayments made via Klarna.\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* swish -\n\nPayments made via Swish\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* boleto -\n\nboleto\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* trustly -\n\nTrustly\n\\* payme -\n\nPayments made via PayMe\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* upi -\n\nupi\n\\* amazon_payments -\n\namazon_payments\n\\* direct_debit -\n\ndirect_debit\n\\* after_pay -\n\nPayments made via Afterpay\n\\* dotpay -\n\ndotpay\n\\* apple_pay -\n\napple_pay\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* google_pay -\n\ngoogle_pay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* pay_co -\n\nPayments made via PayCo\n\\* twint -\n\nPayments made via Twint\n\\* tamara -\n\nPayments made via Tamara.\n\\* pay_to -\n\nPayTo\n\\* pix -\n\nPix\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "id_at_gateway" : { "type" : "string", "deprecated" : false, "description" : "Reference of PaymentIntent at gateway\n", "maxLength" : 50, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "

Error code received from the payment gateway when the payment_attempt\nfails.

", "maxLength" : 100, "example" : null }, "error_text" : { "type" : "string", "deprecated" : false, "description" : "Error message received from the payment gateway on failure.\n", "maxLength" : 65000, "example" : null }, "checkout_details" : { "type" : "string", "deprecated" : false, "description" : "JSON-encoded object that includes customer and browser details collected during checkout.\n", "maxLength" : 65000, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the active payment attempt was created.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the active payment attempt was last modified.\n", "example" : null }, "error_detail" : { "type" : "object", "deprecated" : false, "description" : "Comprehensive information regarding the error experienced during an unsuccessful or declined transaction. Learn more about \\[gateway error references\\](/docs/api/v2/pcv-1/gateway_error_references)\n", "properties" : { "request_id" : { "type" : "string", "deprecated" : false, "description" : "This is a unique identifier assigned by the payment gateway. It is used to track the request at the payment gateway\n", "maxLength" : 100, "example" : null }, "error_category" : { "type" : "string", "deprecated" : false, "description" : "This parameter categorizes the type of error that occurred for the request. It helps in understanding whether the error is due to API error, validation, processing, network issues, and more\n", "maxLength" : 100, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "A gateway-specific code that corresponds to the particular error encountered for the request. This code can be used for identifying the error in a standardized manner across the gateway's services\n", "maxLength" : 100, "example" : null }, "error_message" : { "type" : "string", "deprecated" : false, "description" : "A message provided by the gateway that describes the nature of the error encountered\n", "maxLength" : 65000, "example" : null }, "decline_code" : { "type" : "string", "deprecated" : false, "description" : "When a transaction is declined, this code is provided by the gateway to specify the reason for the decline\n", "maxLength" : 100, "example" : null }, "decline_message" : { "type" : "string", "deprecated" : false, "description" : "This message gives a descriptive explanation of the reason for the transaction's decline\n", "maxLength" : 65000, "example" : null }, "network_error_code" : { "type" : "string", "deprecated" : false, "description" : "This code represents errors that originate from the payment network (such as Visa, MasterCard, and more). It is different from the gateway error code and is specific to the network's error-handling system\n", "maxLength" : 100, "example" : null }, "network_error_message" : { "type" : "string", "deprecated" : false, "description" : "This the network related error message from the gateway, this is a detailed message provided by the payment network explaining the nature of the network error encountered\n", "maxLength" : 65000, "example" : null }, "error_field" : { "type" : "string", "deprecated" : false, "description" : "This parameter indicates which specific data field or attribute in the request caused the error\n", "maxLength" : 100, "example" : null }, "recommendation_code" : { "type" : "string", "deprecated" : false, "description" : "After an error has occurred, the gateway or payment network may provide a recommendation code. This code suggests a course of action or remedy that you can follow to resolve the issue\n", "maxLength" : 100, "example" : null }, "recommendation_message" : { "type" : "string", "deprecated" : false, "description" : "This message is intended to provide guidance or suggestions on action or remedy that you can follow to resolve the issue\n", "maxLength" : 65000, "example" : null }, "processor_error_code" : { "type" : "string", "deprecated" : false, "description" : "This code is provided by the payment processor (the entity that handles the transaction between the bank accounts and the payment networks) and indicates errors that occur at this stage of the payment process\n", "maxLength" : 100, "example" : null }, "processor_error_message" : { "type" : "string", "deprecated" : false, "description" : "This message describes the specific error that the payment processor encountered\n", "maxLength" : 65000, "example" : null }, "error_cause_id" : { "type" : "string", "deprecated" : false, "description" : "A [Chargebee-defined code](/docs/api/errors)\nthat corresponds to the specific error encountered during the request. This code helps in identifying and standardizing the error across different gateway services for consistent error handling.\n", "maxLength" : 150, "example" : null }, "processor_advice_code" : { "type" : "string", "deprecated" : false, "description" : "Advice code returned by the payment gateway or processor that provides guidance on how to handle a declined transaction, for example, whether to retry or take a different action.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "routing_rule_id" : { "type" : "string", "deprecated" : false, "description" : "

The ID of the Advanced Routing Rule used to select the payment gateway for this payment attempt. The value is 0 when the default routing configuration is used. This attribute is not returned when no routing evaluation is available.

\n

Note:

", "maxLength" : 50, "example" : null }, "payment_method_display_rule_id" : { "type" : "string", "deprecated" : false, "description" : "

The ID of the Payment Method Display Rule used to determine which payment methods are shown at checkout for this payment attempt. The value is 0 when the default payment method display configuration is used. This attribute is not returned when no payment method display evaluation is available.

\n

Note:

", "maxLength" : 50, "example" : null } }, "required" : [ "created_at", "modified_at", "status" ], "example" : null }, "payment_attempts" : { "type" : "array", "deprecated" : false, "description" : "

List of payment attempts associated with this PaymentIntent. Each item in the list is a payment_attempt object that shares the same structure as active_payment_attempt, except for the routing_rule_id and payment_method_display_rule_id attributes, which are returned only on active_payment_attempt.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for the payment attempt.\n", "maxLength" : 70, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Current status of the payment attempt.

\n* requires_challenge -

The transaction requires the 3DS Challenge flow, where the customer completes authentication through an inline 3DS 2.0 challenge presented by their card issuer.

\n* requires_identification -

Customer's device fingerprint is used to verify their identity. It needs to be sent to the Issuing Bank for verification.

\n* requires_redirection -

The transaction must go through the 3DS Redirection flow, where the customer is redirected to their card issuer's authentication page (3DS 1.0) to verify the payment. After authentication, the customer is redirected to the specified success_url\nor failure_url\n.

\n* inited -

Payment attempt is initialized.

\n* authorized -

3DS verification successfully completed.

\n* pending_authorization -

Waiting for the authorization.

\n* refused -

3DS verification attempt failed.

", "enum" : [ "inited", "requires_identification", "requires_challenge", "requires_redirection", "authorized", "refused", "pending_authorization" ], "example" : null }, "payment_method_type" : { "type" : "string", "default" : "card", "deprecated" : false, "description" : "The payment method of this attempt.\n\\* swish -\n\nPayments made via Swish\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* alipay -\n\nPayments made via Alipay.\n\\* sofort -\n\nsofort\n\\* giropay -\n\ngiropay\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* paypay -\n\nPayPay\n\\* boleto -\n\nboleto\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* pix -\n\nPix\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* faster_payments -\n\nFaster Payments\n\\* paypal_express_checkout -\n\npaypal_express_checkout\n\\* go_pay -\n\nPayments made via GoPay\n\\* pay_by_bank -\n\nPay By Bank\n\\* klarna -\n\nPayments made via Klarna.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* bancontact -\n\nbancontact\n\\* trustly -\n\nTrustly\n\\* wechat_pay -\n\nPayments made via WeChat Pay.\n\\* twint -\n\nPayments made via Twint\n\\* upi -\n\nupi\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* direct_debit -\n\ndirect_debit\n\\* netbanking_emandates -\n\nnetbanking_emandates\n\\* amazon_payments -\n\namazon_payments\n\\* sepa_instant_transfer -\n\nSEPA Instant Transfer\n\\* klarna_pay_now -\n\nKlarna Pay Now\n\\* online_banking_poland -\n\nOnline Banking Poland\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* dotpay -\n\ndotpay\n\\* google_pay -\n\ngoogle_pay\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* payme -\n\nPayments made via PayMe\n\\* card -\n\ncard\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* dana -\n\nPayments made via Dana.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* ideal -\n\nideal\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* pay_co -\n\nPayments made via PayCo\n\\* venmo -\n\nVenmo\n\\* gcash -\n\nPayments made via GCash.\n\\* apple_pay -\n\napple_pay\n\\* tamara -\n\nPayments made via Tamara.\n\\* qpay -\n\nPayments made via Qpay.\n\\* pay_to -\n\nPayTo\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "id_at_gateway" : { "type" : "string", "deprecated" : false, "description" : "Reference of the payment attempt at the gateway.\n", "maxLength" : 50, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "Error code received from the payment gateway on failure.\n", "maxLength" : 100, "example" : null }, "error_text" : { "type" : "string", "deprecated" : false, "description" : "Error message received from the payment gateway on failure.\n", "maxLength" : 65000, "example" : null }, "checkout_details" : { "type" : "string", "deprecated" : false, "description" : "JSON-encoded object that includes customer and browser details collected during checkout.\n", "maxLength" : 65000, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the payment attempt was created.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the payment attempt was last modified.\n", "example" : null }, "error_detail" : { "type" : "object", "deprecated" : false, "description" : "Comprehensive information regarding the error experienced during an unsuccessful or declined transaction. Learn more about \\[gateway error references\\](/docs/api/v2/pcv-1/gateway_error_references)\n", "properties" : { "request_id" : { "type" : "string", "deprecated" : false, "description" : "This is a unique identifier assigned by the payment gateway. It is used to track the request at the payment gateway\n", "maxLength" : 100, "example" : null }, "error_category" : { "type" : "string", "deprecated" : false, "description" : "This parameter categorizes the type of error that occurred for the request. It helps in understanding whether the error is due to API error, validation, processing, network issues, and more\n", "maxLength" : 100, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "A gateway-specific code that corresponds to the particular error encountered for the request. This code can be used for identifying the error in a standardized manner across the gateway's services\n", "maxLength" : 100, "example" : null }, "error_message" : { "type" : "string", "deprecated" : false, "description" : "A message provided by the gateway that describes the nature of the error encountered\n", "maxLength" : 65000, "example" : null }, "decline_code" : { "type" : "string", "deprecated" : false, "description" : "Code provided by the gateway that specifies the reason for the transaction decline.\n", "maxLength" : 100, "example" : null }, "decline_message" : { "type" : "string", "deprecated" : false, "description" : "Descriptive message explaining the reason for the transaction's decline.\n", "maxLength" : 65000, "example" : null }, "network_error_code" : { "type" : "string", "deprecated" : false, "description" : "This code represents errors that originate from the payment network (such as Visa, MasterCard, and more). It is different from the gateway error code and is specific to the network's error-handling system\n", "maxLength" : 100, "example" : null }, "network_error_message" : { "type" : "string", "deprecated" : false, "description" : "This is the network-related error message from the gateway; a detailed message provided by the payment network explaining the nature of the network error encountered\n", "maxLength" : 65000, "example" : null }, "error_field" : { "type" : "string", "deprecated" : false, "description" : "This parameter indicates which specific data field or attribute in the request caused the error\n", "maxLength" : 100, "example" : null }, "recommendation_code" : { "type" : "string", "deprecated" : false, "description" : "After an error has occurred, the gateway or payment network may provide a recommendation code. This code suggests a course of action or remedy that you can follow to resolve the issue\n", "maxLength" : 100, "example" : null }, "recommendation_message" : { "type" : "string", "deprecated" : false, "description" : "This message is intended to provide guidance or suggestions on action or remedy that you can follow to resolve the issue\n", "maxLength" : 65000, "example" : null }, "processor_error_code" : { "type" : "string", "deprecated" : false, "description" : "This code is provided by the payment processor (the entity that handles the transaction between the bank accounts and the payment networks) and indicates errors that occur at this stage of the payment process\n", "maxLength" : 100, "example" : null }, "processor_error_message" : { "type" : "string", "deprecated" : false, "description" : "This message describes the specific error that the payment processor encountered\n", "maxLength" : 65000, "example" : null }, "error_cause_id" : { "type" : "string", "deprecated" : false, "description" : "A [Chargebee-defined code](/docs/api/errors)\nthat corresponds to the specific error encountered during the request. This code helps in identifying and standardizing the error across different gateway services for consistent error handling.\n", "maxLength" : 150, "example" : null }, "processor_advice_code" : { "type" : "string", "deprecated" : false, "description" : "Advice code returned by the payment gateway or processor that provides guidance on how to handle a declined transaction, for example, whether to retry or take a different action.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "routing_rule_id" : { "type" : "string", "deprecated" : false, "description" : "

This attribute is not returned for historical payment attempts. See active_payment_attempt.routing_rule_id.

", "maxLength" : 50, "example" : null }, "payment_method_display_rule_id" : { "type" : "string", "deprecated" : false, "description" : "

This attribute is not returned for historical payment attempts. See active_payment_attempt.payment_method_display_rule_id.

", "maxLength" : 50, "example" : null } }, "required" : [ "created_at", "modified_at", "status" ], "example" : null }, "example" : null }, "payment_intent_metadata" : { "type" : "object", "deprecated" : false, "description" : "Details about the client and the request that Chargebee captured when the payment intent was confirmed.\n", "properties" : { "source" : { "type" : "string", "deprecated" : false, "description" : "The source of the request that confirmed the payment intent.\n\\* portal -\n\nThe request came from the [Self-Serve Portal](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/self-serve-portal).\n\\* collect_now -\n\nThe request came from the [Collect Now](https://apidocs.chargebee.com/docs/api/hosted_pages/collect-now) hosted page.\n\\* card_components -\n\nThe request came from Chargebee.js [Card Components](https://www.chargebee.com/checkout-portal-docs/components-fields.html).\n\\* checkout -\n\nThe request came from [hosted checkout](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/hosted-checkout), including hosted checkout for [gift subscriptions](https://www.chargebee.com/docs/billing/2.0/subscriptions/gift-subscriptions#gift-subscription-workflow).\n\\* payment_components -\n\nThe request came from Chargebee.js [Payment Components](https://www.chargebee.com/checkout-portal-docs/payment-components.html).\n\\* payment_method_helper -\n\nThe request came from the Chargebee.js [Payment Method Helper](https://www.chargebee.com/checkout-portal-docs/payment-method-helper.html).\n", "enum" : [ "payment_method_helper", "card_components", "checkout", "collect_now", "portal", "payment_components" ], "example" : null }, "client_ip_address" : { "type" : "string", "deprecated" : false, "description" : "The IP address from which the payment intent was confirmed.\n", "maxLength" : 50, "example" : null }, "user_agent" : { "type" : "string", "deprecated" : false, "description" : "The [user agent string](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent) of the client from which the payment intent was confirmed.\n", "maxLength" : 1000, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when Chargebee captured this metadata.\n", "example" : null } }, "required" : [ "source" ], "example" : null } }, "required" : [ "amount", "created_at", "expires_at", "id", "modified_at", "status" ], "example" : null }, "PaymentIntentCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_intent" : { "$ref" : "#/components/schemas/PaymentIntent" } }, "required" : [ "payment_intent" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentIntentUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_intent" : { "$ref" : "#/components/schemas/PaymentIntent" } }, "required" : [ "payment_intent" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentMethod" : { "type" : "string", "default" : "card", "deprecated" : false, "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay", "chargeback", "card", "amazon_payments", "paypal_express_checkout", "direct_debit", "alipay", "unionpay", "apple_pay", "wechat_pay", "ach_credit", "sepa_credit", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "boleto", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay" ], "example" : null }, "PaymentMethodSavePolicy" : { "type" : "string", "deprecated" : false, "enum" : [ "always", "ask", "never" ], "example" : null }, "PaymentMethodType" : { "type" : "string", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "PaymentReferenceNumber" : { "type" : "object", "description" : "Using this resource you can create reference numbers for Payment Instructions at the invoice level, allowing for multiple payment information and payment reference numbers to be associated with a single invoice. However, only one PRN is generated for each payment method.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the payment_reference_number\nresource is a unique identifier assigned to the PRN to track and reference in systems.

", "maxLength" : 40, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

This attribute helps type\nfield in the API, specifies how to reconcile offline payments, and generate payment_reference_number\non invoices based on country-specific rules. Setting the type\nfield generates payment_reference_number\nfor the respective country and includes them on the invoice for correct reconciliation.

\n* 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.

\n* fik -

Denmark based number calculated using recursive MOD 10 algorithm.

\n* kid -

The KID number (kundeidentifikasjon) in Norway is an abbreviation for "Customer identification". It is used to associate payments with the customer and invoice.

\n* 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.

", "enum" : [ "kid", "ocr", "frn", "fik", "swiss_reference" ], "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "A number is generated based on the configuration type of the PRN during the invoice creation process.\n", "maxLength" : 100, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "

The invoice_id\nof the payment reference number (PRN) resource is the unique identifier assigned to the invoice that the PRN is associated with.

", "maxLength" : 50, "example" : null } }, "required" : [ "id", "number", "type" ], "example" : null }, "PaymentRefundedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "credit_note", "customer", "invoice", "subscription", "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSchedule" : { "type" : "object", "description" : "

Payment schedules for an invoice refer to a payment structure where the amount_due\non an invoice is divided into smaller, more manageable parts, each of which is paid over a specified period.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An auto-generated unique identifier for the payment schedule.\n", "maxLength" : 40, "example" : null }, "scheme_id" : { "type" : "string", "deprecated" : false, "description" : "

The identifier of the payment_schedule_scheme\n, used to create the payment schedules.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the types of entity this payment schedule is based on.\n\\* invoice -\n\nIndicates the invoice entity type\n", "enum" : [ "invoice" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the entity this payment schedule is based on.\n", "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The part of the invoice.amount_due\nto be distributed across the payment schedules. If not specified, the entire invoice.amount_due\nis considered by default.

", "minimum" : 0, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The timestamp at which the payment_schedule\nwas created.

", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Specifies when these payment schedules are updated recently.\n", "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the transaction amount.\n", "maxLength" : 3, "example" : null }, "schedule_entries" : { "type" : "array", "deprecated" : false, "description" : "List of schedule entries\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An auto-generated unique identifier for the payment schedules.\n", "maxLength" : 40, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date at which this payment schedule is scheduled.\n", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Maximum amount that this payment schedule is allowed to collect.\n", "minimum" : 0, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Defines the status for each payment schedule.

\n* posted -

The installment is unpaid or partially paid and the due date (date) has not passed.

\n* payment_due -

The installment is unpaid or partially paid and the due date (date) has passed.

\n* paid -

The installment has been paid.

", "enum" : [ "posted", "payment_due", "paid" ], "example" : null } }, "required" : [ "amount", "date", "id", "status" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "entity_id", "entity_type", "id", "scheme_id" ], "example" : null }, "PaymentScheduleEstimate" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "scheme_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "invoice" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "schedule_entries" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "posted", "payment_due", "paid" ], "example" : null } }, "required" : [ "amount", "date", "id", "status" ], "example" : null }, "example" : null } }, "required" : [ "amount", "entity_type", "id", "scheme_id" ], "example" : null }, "PaymentScheduleScheme" : { "type" : "object", "description" : "

Payment schedules for an invoice refer to a payment structure where the amount_due\non an invoice is divided into smaller, more manageable parts, each of which is paid over a specified period. Payment schedule scheme is a configuration or set of rules for creating payment schedules. After creating a payment schedule scheme, you can use it to generate payment schedules for multiple invoices.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An auto-generated unique identifier for the payment schedule scheme.\n", "maxLength" : 40, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "The name of a payment schedule scheme.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief description for this payment schedule scheme.\n", "maxLength" : 200, "example" : null }, "number_of_schedules" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the total number of payment schedules for the invoice. The maximum number_of_schedules\nvaries based on the period_unit\n: - Day: Up to 30 schedules

\n", "maximum" : 52, "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines the time unit for intervals between payment schedules. Possible values are: day, week, and month.\n\\* month -\n\nWhen the time unit for intervals between payment schedules is set as month\n\\* week -\n\nWhen the time unit for intervals between payment schedules is set as week\n\\* day -\n\nWhen the time unit for intervals between payment schedules is set as day\n", "enum" : [ "day", "week", "month" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The time period between the effective dates of two consecutive payment schedules, expressed in period_units. Use this parameter to have fixed intervals between payment schedules. The maximum period\nvaries based on the period_unit\n: - Day: Up to 30 days

\n", "maximum" : 30, "minimum" : 1, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The timestamp at which the payment_schedule_scheme\nwas created.

", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Defines the timestamp when the config was last updated\n", "example" : null } }, "required" : [ "created_at", "id", "number_of_schedules", "period_unit" ], "example" : null }, "PaymentScheduleSchemeCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_schedule_scheme" : { "$ref" : "#/components/schemas/PaymentScheduleScheme" }, "flexible_schedules" : { "type" : "object", "description" : "JSON object\n", "example" : null } }, "required" : [ "flexible_schedules", "payment_schedule_scheme" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentScheduleSchemeDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_schedule_scheme" : { "$ref" : "#/components/schemas/PaymentScheduleScheme" }, "flexible_schedules" : { "type" : "object", "description" : "JSON object\n", "example" : null } }, "required" : [ "flexible_schedules", "payment_schedule_scheme" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSchedulesCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_schedule" : { "$ref" : "#/components/schemas/PaymentSchedule" } }, "required" : [ "payment_schedule" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSchedulesUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_schedule" : { "$ref" : "#/components/schemas/PaymentSchedule" } }, "required" : [ "payment_schedule" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSource" : { "type" : "object", "description" : "**Updates**\n\nThis API obsoletes the [Cards API](/docs/api/cards)\nin Chargebee.\n\nRepresents the payment source for the customer. Specific types of payment source (Card, Direct Debit, Paypal Express Checkout, etc.) is defined as sub-resource in the response object. You can find the list of supported payment sources and the expected input parameters [here](/docs/api/payment_parameters). See [Payment source attributes](/docs/api/payment_sources/payment-source-object) for a descriptive list of attributes and payment source types.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the payment source\n", "maxLength" : 40, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this payment source resource was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this payment source resource is created.\n", "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Type of payment source\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* klarna -\n\nPayments made via Klarna.\n\\* giropay -\n\nPayments made via giropay.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* pay_by_bank -\n\nPay By Bank\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* paypay -\n\nPayments made via PayPay\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* twint -\n\nPayments made via Twint\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* trustly -\n\nTrustly\n\\* upi -\n\nUPI Payments.\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* south_korean_cards -\n\nPayments made via South Korean Cards\n\\* qpay -\n\nPayments made via Qpay.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* pay_to -\n\nPayments made via PayTo\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* sofort -\n\nPayments made via Sofort.\n\\* gcash -\n\nPayments made via GCash.\n\\* dana -\n\nPayments made via Dana.\n\\* pix -\n\nPayments made via Pix\n\\* pay_co -\n\nPayments made via PayCo\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* go_pay -\n\nPayments made via GoPay\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* payme -\n\nPayments made via PayMe\n\\* tamara -\n\nPayments made via Tamara.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* swish -\n\nPayments made via Swish\n\\* venmo -\n\nPayments made via Venmo\n\\* ideal -\n\nPayments made via iDEAL.\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "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 payments this will be the identifier provided by the gateway/card vault for the specific payment method resource.\n**Note:**\nThis is not the one time temporary token provided by gateways like Stripe.\n", "maxLength" : 200, "example" : null }, "status" : { "type" : "string", "default" : "valid", "deprecated" : false, "description" : "Current status of the payment source.\n\\* valid -\n\nA payment source that is valid and active.\n\\* expiring -\n\nA payment source that is expiring (like card's status based on its expiry date).\n\\* invalid -\n\nThe billing agreement cannot be used. It might become valid again either automatically or due to customer action.\n\\* pending_verification -\n\nThe payment source needs to be verified\n\\* expired -\n\nA payment source that has expired\n", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "Name of the gateway this payment source is stored with.\n\\* bluesnap -\n\nBlueSnap is a payment gateway.\n\\* jp_morgan -\n\nJ.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different [payment_source_type](/docs/api/payment_sources/payment_source-object#type). \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/jp-morgan-bacs&ref=feature) to enable the J.P. Morgan Mobility Payment Solutions gateway via payFURL for your test and live sites.\n\\* tco -\n\n2Checkout is a payment gateway.\n\\* payway -\n\nPayway is a payment gateway that enables secure card and payment acceptance.\n\\* razorpay -\n\nRazorpay 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.\n\\* dlocal -\n\nDlocal provides payment solutions for global commerce by accepting local payment methods.\n\\* checkout_com -\n\nCheckout.com is a payment gateway.\n\\* adyen -\n\nAdyen is a payment gateway.\n\\* braintree -\n\nBraintree is a payment gateway.\n\\* paystack -\n\nPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/paystack&ref=feature) to enable Paystack for your test and live sites.\n\\* pay_com -\n\nPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n\\* moneris_us -\n\nMoneris USA is a payment gateway.\n\\* pin -\n\nPin is a payment gateway\n\\* moneris -\n\nMoneris is a payment gateway.\n\\* chargebee -\n\nChargebee test gateway.\n\\* cybersource -\n\nCyberSource is a payment gateway.\n\\* ecentric -\n\nEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n\\* first_data_global -\n\nFirst Data Global Gateway Virtual Terminal Account\n\\* exact -\n\nExact Payments is a payment gateway.\n\\* nuvei -\n\nNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/nuvei&ref=feature) to enable Nuvei for your test and live sites.\n\\* eway -\n\neWAY Account is a payment gateway.\n\\* amazon_payments -\n\nAmazon Payments is a payment service provider.\n\\* sage_pay -\n\nSage Pay is a payment gateway.\n\\* elavon -\n\nElavon Virtual Merchant is a payment solution.\n\\* orbital -\n\nChase Paymentech(Orbital) is a payment gateway.\n\\* beanstream -\n\nBambora(formerly known as Beanstream) is a payment gateway.\n\\* hdfc -\n\nHDFC Account is a payment gateway.\n\\* bank_of_america -\n\nBank of America Gateway\n\\* gocardless -\n\nGoCardless is a payment service provider.\n\\* paymill -\n\nPAYMILL is a payment gateway.\n\\* balanced_payments -\n\nBalanced is a payment gateway\n\\* twikey -\n\nTwikey is a payment service provider that specializes in processing direct debit payments across the EU.\n\\* moyasar -\n\nMoyasar is a fully integrated online payment service that makes accepting payments simple and secure.\n\\* deutsche_bank -\n\nDeutsche Bank is the leading German bank with strong European roots and a global network. \nThis feature is a **Private Beta Release**.\n\\* bluepay -\n\nBluePay is a payment gateway.\n\\* paypal_express_checkout -\n\nPayPal Express Checkout is a payment gateway.\n\\* paypal_payflow_pro -\n\nPayPal Payflow Pro is a payment gateway.\n\\* global_payments -\n\nGlobal Payments is a payment service provider.\n\\* not_applicable -\n\nIndicates that payment gateway is not applicable for this resource.\n\\* nmi -\n\nNMI is a payment gateway.\n\\* worldpay -\n\nWorldPay is a payment gateway\n\\* authorize_net -\n\nAuthorize.net is a payment gateway\n\\* tempus -\n\nTempus Technologies is a payment gateway and payments technology provider offering secure payment processing with point-to-point encryption (P2PE) and tokenization.\n\\* stripe -\n\nStripe is a payment gateway.\n\\* metrics_global -\n\nMetrics global is a leading payment service provider providing unified payment services in the US.\n\\* windcave -\n\nWindcave provides an end to end payment processing solution in ANZ and other leading global markets.\n\\* quickbooks -\n\nIntuit QuickBooks Payments gateway\n\\* wepay -\n\nWePay is a payment gateway.\n\\* ezidebit -\n\nEzidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \nThis feature is a **Private Beta Release**.\n\\* wirecard -\n\nWireCard Account is a payment service provider.\n\\* chargebee_payments -\n\nChargebee Payments gateway\n\\* paypal_pro -\n\nPayPal Pro Account is a payment gateway.\n\\* paypal -\n\nPayPal Commerce is a payment gateway.\n\\* ingenico_direct -\n\nWorldline Online Payments is a payment gateway.\n\\* ogone -\n\nIngenico ePayments (formerly known as Ogone) is a payment gateway.\n\\* migs -\n\nMasterCard Internet Gateway Service payment gateway.\n\\* vantiv -\n\nVantiv is a payment gateway.\n\\* eway_rapid -\n\neWAY Rapid is a payment gateway.\n\\* mollie -\n\nMollie is a payment gateway.\n\\* solidgate -\n\nSolidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release**.\n\\* ebanx -\n\nEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which this payment source is stored with.\n", "maxLength" : 50, "example" : null }, "ip_address" : { "type" : "string", "deprecated" : false, "description" : "The IP address of the customer. Used primarily for referral integration and EU VAT validation.\n", "maxLength" : 50, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "[two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html)\nISO country code.\n", "maxLength" : 50, "example" : null }, "vault_token" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

When present, the payment source has been vaulted. Contains status (active or inactive), created_at, and updated_at as Unix timestamps in seconds.

", "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates that this resource has been deleted.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nof this payment_source.\nThis is always the same as the business entity of the customer.

\n", "maxLength" : 50, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Card details associated with this payment source.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address of the cardholder\n", "maxLength" : 70, "example" : null }, "iin" : { "type" : "string", "deprecated" : false, "description" : "The Issuer Identification Number, i.e. the first six digits of the card number\n", "maxLength" : 6, "minLength" : 6, "example" : null }, "last4" : { "type" : "string", "deprecated" : false, "description" : "Last four digits of the card number\n", "maxLength" : 4, "minLength" : 4, "example" : null }, "brand" : { "type" : "string", "deprecated" : false, "description" : "Card brand\n\\* cartes_bancaires -\n\nA Cartes Bancaires card.\n\\* not_applicable -\n\nUsed for offline entries in transactions. Not applicable for cards\n\\* maestro -\n\nA Maestro card.\n\\* dankort -\n\nA Dankort card.\n\\* tarjeta_naranja -\n\nA Tarjeta Naranja card.\n\\* jcb -\n\nA JCB card.\n\\* other -\n\nCard belonging to types other than those listed above.\n\\* cmr_falabella -\n\nA CMR Falabella card.\n\\* discover -\n\nA Discover card.\n\\* elo -\n\nA Elo card.\n\\* diners_club -\n\nA Diner's Club card.\n\\* mada -\n\nA Mada card.\n\\* cabal -\n\nA Cabal card.\n\\* american_express -\n\nAn American Express card.\n\\* visa -\n\nA Visa card.\n\\* cencosud -\n\nA Cencosud card.\n\\* carnet -\n\nA Carnet card.\n\\* argencard -\n\nAn Argencard.\n\\* mastercard -\n\nA MasterCard.\n\\* hipercard -\n\nAn Hipercard.\n\\* bancontact -\n\nA Bancontact card.\n\\* rupay -\n\nA Rupay card.\n\\* nativa -\n\nA Nativa card.\n", "enum" : [ "visa", "mastercard", "american_express", "discover", "jcb", "diners_club", "other", "bancontact", "cmr_falabella", "tarjeta_naranja", "nativa", "cencosud", "cabal", "argencard", "elo", "hipercard", "carnet", "rupay", "maestro", "dankort", "cartes_bancaires", "mada", "not_applicable" ], "example" : null }, "funding_type" : { "type" : "string", "deprecated" : false, "description" : "Card Funding type\n\\* not_known -\n\nAn unknown card.\n\\* debit -\n\nA debit card.\n\\* credit -\n\nA credit card.\n\\* not_applicable -\n\nUsed for ACH. Not applicable for cards\n\\* prepaid -\n\nA prepaid card.\n", "enum" : [ "credit", "debit", "prepaid", "not_known", "not_applicable" ], "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set billing_state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "masked_number" : { "type" : "string", "deprecated" : false, "description" : "Masked credit card number that is safe to show.\n", "maxLength" : 19, "example" : null } }, "required" : [ "brand", "expiry_month", "expiry_year", "funding_type", "iin", "last4" ], "example" : null }, "bank_account" : { "type" : "object", "deprecated" : false, "description" : "Bank account details the direct debit or ACH or NetBanking agreement/mandate created with this payment source.\n", "properties" : { "last4" : { "type" : "string", "deprecated" : false, "description" : "Last four digits of the bank account number\n", "maxLength" : 4, "minLength" : 4, "example" : null }, "name_on_account" : { "type" : "string", "deprecated" : false, "description" : "Account holder's name as per bank account.\n", "maxLength" : 300, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's first name as per bank account.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's last name as per bank account.\n", "maxLength" : 150, "example" : null }, "direct_debit_scheme" : { "type" : "string", "deprecated" : false, "description" : "Bank account's scheme to which the mandate and associated payments are submitted.\n\\* becs_nz -\n\nThe Bulk Electronic Clearing System (BECS) is a Direct Debit scheme and followed in New-Zealand for Direct Debit system.\n\\* becs -\n\nThe Bulk Electronic Clearing System (BECS) is a Direct Debit scheme and followed in Australia for Direct Debit system.\n\\* pad -\n\nPre-Authorized Debit (PAD) is the scheme used for collecting Direct Debit payments from customers in Canada.\n\\* ach -\n\nUS Bank Account\n\\* sepa_core -\n\nSEPA Direct Debit is a Europe-wide Direct Debit system that allows merchants to collect Euro-denominated payments.\n\\* autogiro -\n\nBg Autogiro is a Direct Debit scheme for collecting Krona-denominated payments from a bank account in Sweden.\n\\* bacs -\n\nAutomated payments are at the very centre of the UK's financial system, providing an essential service for both consumers and organisations. Bacs is the company which runs Direct Debit in the UK.\n\\* not_applicable -\n\nnot_applicable\n", "enum" : [ "ach", "bacs", "sepa_core", "autogiro", "becs", "becs_nz", "pad", "not_applicable" ], "example" : null }, "bank_name" : { "type" : "string", "deprecated" : false, "description" : "Name of account holder's bank.\n", "maxLength" : 100, "example" : null }, "mandate_id" : { "type" : "string", "deprecated" : false, "description" : "Mandate Id. Applicable for SEPA, BACS, Autogiro, and BECS.\n", "maxLength" : 50, "minLength" : 1, "example" : null }, "account_type" : { "type" : "string", "deprecated" : false, "description" : "Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/)\nACH and Razorpay NetBanking users only. If not passed, account type is taken as null.\n\\* checking -\n\nChecking Account\n\\* business_checking -\n\nBusiness Checking Account\n\\* savings -\n\nSavings Account\n\\* current -\n\nCurrent Account\n", "enum" : [ "checking", "savings", "business_checking", "current" ], "example" : null }, "echeck_type" : { "type" : "string", "deprecated" : false, "description" : "For Authorize.net ACH users only. Indicates the type of eCheck.\n\\* ppd -\n\nPayment Authorization is prearranged between the customer and the merchant.\n\\* ccd -\n\nPayment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type.\n\\* web -\n\nPayment Authorization obtained from the customer via the internet.\n", "enum" : [ "web", "ppd", "ccd" ], "example" : null }, "account_holder_type" : { "type" : "string", "deprecated" : false, "description" : "For Stripe ACH users only. Indicates the account holder type.\n\\* individual -\n\nIndividual Account.\n\\* company -\n\nCompany Account.\n", "enum" : [ "individual", "company" ], "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "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.\n", "maxLength" : 70, "example" : null } }, "required" : [ "last4" ], "example" : null }, "boleto" : { "type" : "object", "deprecated" : false, "description" : "Boleto payment source details of the customer\n", "properties" : { "last4" : { "type" : "string", "deprecated" : false, "description" : "Last four digits of unique id for voucher payment source ex: tax_id\n", "maxLength" : 4, "minLength" : 4, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Customer first name as per voucher payment source.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Customer last name as per voucher payment source.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address associated Customer's voucher payment source.\n", "maxLength" : 70, "example" : null } }, "required" : [ "last4" ], "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Billing address for the payment source.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "amazon_payment" : { "type" : "object", "deprecated" : false, "description" : "Amazon payments details associated with this payment source.\n", "properties" : { "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address associated with Amazon payment account\n", "maxLength" : 70, "example" : null }, "agreement_id" : { "type" : "string", "deprecated" : false, "description" : "Billing agreement id\n", "maxLength" : 50, "example" : null } }, "example" : null }, "upi" : { "type" : "object", "deprecated" : false, "description" : "Represents the payment method that allows you to make payments directly using a bank account.\n", "properties" : { "vpa" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier mapped with an individuals bank account to help UPI track the account.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "paypal" : { "type" : "object", "deprecated" : false, "description" : "PayPal Express Checkout details associated with this payment source.\n", "properties" : { "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address associated with PayPal Express Checkout\n", "maxLength" : 70, "example" : null }, "agreement_id" : { "type" : "string", "deprecated" : false, "description" : "Billing agreement id\n", "maxLength" : 50, "example" : null } }, "example" : null }, "venmo" : { "type" : "object", "deprecated" : false, "description" : "Venmo details associated with this payment source.\n", "properties" : { "user_name" : { "type" : "string", "deprecated" : false, "description" : "User name associated with customer's account in Venmo\n", "maxLength" : 50, "example" : null } }, "example" : null }, "klarna_pay_now" : { "type" : "object", "deprecated" : false, "description" : "Klarna Pay Now payment source details of the customer\n", "properties" : { "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address associated Customer's klarna payment source.\n", "maxLength" : 70, "example" : null } }, "example" : null }, "mandates" : { "type" : "array", "deprecated" : false, "description" : "Mandate details associated with the payment source.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique mandate identifier used for recurring payments.\n", "maxLength" : 250, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Chargebee's subscription id used to find the mapping between the payment source and the Subscription.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the mandate is created\n", "example" : null } }, "required" : [ "created_at", "id", "subscription_id" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "customer_id", "deleted", "gateway", "id", "reference_id", "status", "type" ], "example" : null }, "PaymentSourceAddedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource" } }, "required" : [ "customer", "payment_source" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSourceBusinessEntityChangedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "business_entity_transfer" : { "$ref" : "#/components/schemas/BusinessEntityTransfer" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource" } }, "required" : [ "business_entity_transfer", "payment_source" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSourceDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource" } }, "required" : [ "customer", "payment_source" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSourceExpiredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource" } }, "required" : [ "customer", "payment_source" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSourceExpiringEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource" } }, "required" : [ "customer", "payment_source" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSourceLocallyDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource" } }, "required" : [ "customer", "payment_source" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSourceUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource" } }, "required" : [ "customer", "payment_source" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentSucceededEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "customer", "invoice", "subscription", "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PaymentVoucher" : { "type" : "object", "description" : "The Payment Voucher resource represents a voucher that has been created for a customer to initiate voucher-based payment. This resource contains relevant details such as the voucher URL, the amount of the voucher, the status of the voucher, and more. Currently, the only supported voucher-based payment source is Boleto. Boleto is a payment method in Brazil that is regulated by the Central Bank of Brazil and is considered an official form of payment. This is also a popular voucher-based payment method in Brazil. \n**Note:**\nThis resource can be extended in the future to support other types of payment sources for vouchers.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the payment voucher.\n", "maxLength" : 40, "example" : null }, "id_at_gateway" : { "type" : "string", "deprecated" : false, "description" : "The id with which this voucher is referred in gateway.\n", "maxLength" : 100, "example" : null }, "payment_voucher_type" : { "type" : "string", "deprecated" : false, "description" : "Type of the payment source.\n\\* boleto -\n\nBoleto\n", "enum" : [ "boleto" ], "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the Voucher will expire if left unconsumed.\n", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of the payment voucher.\n\\* consumed -\n\nConsumed for a transaction and cannot be used again\n\\* expired -\n\nExpired before consumed and cannot be used again\n\\* active -\n\nActive and ready to be consumed\n\\* failure -\n\nFailed to create the voucher due to gateway rejection\n", "enum" : [ "active", "consumed", "expired", "failure" ], "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this payment voucher is made.\n", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the voucher.\n", "maxLength" : 3, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount for this payment voucher.\n", "minimum" : 1, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for this voucher\n", "maxLength" : 50, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the payment source for which this payment voucher is created\n", "maxLength" : 40, "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "

The gateway through which this payment voucher was created.\nNote:\nNote: Currently, stripe\nis the only supported gateway through which you can create the payment voucher.

\n* twikey -

Twikey is a payment service provider that specializes in processing direct debit payments across the EU.

\n* ecentric -

Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.

\n* bluesnap -

BlueSnap is a payment gateway.

\n* jp_morgan -

J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type.

\n

This feature is a Private Beta Release. Request access to enable the J.P. Morgan Mobility Payment Solutions gateway via payFURL for your test and live sites.

\n* tco -

2Checkout is a payment gateway.

\n* first_data_global -

First Data Global Gateway Virtual Terminal Account

\n* payway -

Payway is a payment gateway that enables secure card and payment acceptance.

\n* moyasar -

Moyasar is a fully integrated online payment service that makes accepting payments simple and secure.

\n* exact -

Exact Payments is a payment gateway.

\n* deutsche_bank -

Deutsche Bank is the leading German bank with strong European roots and a global network.

\n

This feature is a Private Beta Release.

\n* bluepay -

BluePay is a payment gateway.

\n* paypal_express_checkout -

PayPal Express Checkout is a payment gateway.

\n* 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.

\n

This feature is a Private Beta Release. Request access to enable Nuvei for your test and live sites.

\n* eway -

eWAY Account is a payment gateway.

\n* metrics_global -

Metrics global is a leading payment service provider providing unified payment services in the US.

\n* paypal_payflow_pro -

PayPal Payflow Pro is a payment gateway.

\n* 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.

\n* global_payments -

Global Payments is a payment service provider.

\n* amazon_payments -

Amazon Payments is a payment service provider.

\n* dlocal -

Dlocal provides payment solutions for global commerce by accepting local payment methods.

\n* not_applicable -

Indicates that payment gateway is not applicable for this resource.

\n* windcave -

Windcave provides an end to end payment processing solution in ANZ and other leading global markets.

\n* checkout_com -

Checkout.com is a payment gateway.

\n* adyen -

Adyen is a payment gateway.

\n* braintree -

Braintree is a payment gateway.

\n* nmi -

NMI is a payment gateway.

\n* quickbooks -

Intuit QuickBooks Payments gateway

\n* wepay -

WePay is a payment gateway.

\n* worldpay -

WorldPay is a payment gateway

\n* paystack -

Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline.

\n

This feature is a Private Beta Release. Request access to enable Paystack for your test and live sites.

\n* ezidebit -

Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses.

\n

This feature is a Private Beta Release.

\n* pay_com -

Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.

\n* wirecard -

WireCard Account is a payment service provider.

\n* chargebee_payments -

Chargebee Payments gateway

\n* sage_pay -

Sage Pay is a payment gateway.

\n* moneris_us -

Moneris USA is a payment gateway.

\n* pin -

Pin is a payment gateway

\n* authorize_net -

Authorize.net is a payment gateway

\n* elavon -

Elavon Virtual Merchant is a payment solution.

\n* paypal_pro -

PayPal Pro Account is a payment gateway.

\n* orbital -

Chase Paymentech(Orbital) is a payment gateway.

\n* paypal -

PayPal Commerce is a payment gateway.

\n* beanstream -

Bambora(formerly known as Beanstream) is a payment gateway.

\n* hdfc -

HDFC Account is a payment gateway.

\n* ingenico_direct -

Worldline Online Payments is a payment gateway.

\n* ogone -

Ingenico ePayments (formerly known as Ogone) is a payment gateway.

\n* migs -

MasterCard Internet Gateway Service payment gateway.

\n* tempus -

Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with point-to-point encryption (P2PE) and tokenization.

\n* stripe -

Stripe is a payment gateway.

\n* vantiv -

Vantiv is a payment gateway.

\n* moneris -

Moneris is a payment gateway.

\n* bank_of_america -

Bank of America Gateway

\n* chargebee -

Chargebee test gateway.

\n* eway_rapid -

eWAY Rapid is a payment gateway.

\n* gocardless -

GoCardless is a payment service provider.

\n* mollie -

Mollie is a payment gateway.

\n* paymill -

PAYMILL is a payment gateway.

\n* balanced_payments -

Balanced is a payment gateway

\n* solidgate -

Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.

\n

This feature is a Private Beta Release.

\n* cybersource -

CyberSource is a payment gateway.

\n* ebanx -

EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.

\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "payload" : { "type" : "string", "deprecated" : false, "description" : "Payload from the gateway response with voucher details\n", "maxLength" : 65000, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "Error code received from the payment gateway on failure.\n", "maxLength" : 100, "example" : null }, "error_text" : { "type" : "string", "deprecated" : false, "description" : "Error message received from the payment gateway on failure.\n", "maxLength" : 65000, "example" : null }, "url" : { "type" : "string", "deprecated" : false, "description" : "Chargebee Hosted Page url for payment voucher\n", "maxLength" : 65000, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this payment voucher occurred date.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this voucher was last updated.\n", "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the customer.\n", "maxLength" : 50, "example" : null }, "linked_invoices" : { "type" : "array", "deprecated" : false, "description" : "Invoices related to the generated voucher\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for the invoice.\n", "maxLength" : 50, "example" : null }, "txn_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the payment voucher.\n", "maxLength" : 40, "example" : null }, "applied_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which the transaction is applied.\n", "example" : null } }, "required" : [ "applied_at", "invoice_id", "txn_id" ], "example" : null }, "example" : null } }, "required" : [ "currency_code", "customer_id", "gateway", "id", "payment_voucher_type" ], "example" : null }, "PaymentVoucherType" : { "type" : "string", "deprecated" : false, "enum" : [ "boleto" ], "example" : null }, "Pc2Migration" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "initiated", "data_transfer_started", "data_transfer_completed", "migration_completed", "failed", "draft_items_step_1_started", "draft_items_step_1_completed", "draft_item_families_step_2_completed", "id_correction_step_3_completed", "pc1_to_draft_model_started" ], "example" : null }, "current_action" : { "type" : "string", "deprecated" : false, "enum" : [ "prepare_draft_data", "autocorrect_invalid_and_duplicate_ids", "enable_site_settings", "transfer_custom_field", "transfer_item_family", "transfer_item", "migrate_subscription_item_tiers", "transfer_coupon", "enable_pc2_site_setting", "no_pending_action", "contact_support", "clear_sandbox_stale_ms_data", "transfer_attached_item", "map_pc1_data_to_draft_items" ], "example" : null }, "status_details" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "error_details" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "api_hit_count" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "example" : null }, "is_internal_migration" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "is_id_processor_applicable" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "is_attached_item_processor_applicable" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "started_by" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "data_transfer_started_by" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "migration_completed_by" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "started_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "data_transfer_completed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "migration_completed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "id", "started_at", "status" ], "example" : null }, "Pc2MigrationApplicableItem" : { "type" : "object", "properties" : { "pc1_plan_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "pc1_plan_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc1_addon_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "pc2_addon_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc2_plan_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc2_plan_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "event_type" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "example" : null }, "Pc2MigrationItem" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc2_migration_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "pc2_migration_item_family_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "pc1_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan", "addon" ], "example" : null }, "is_recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "is_giftable" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "enabled_for_checkout" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "gift_claim_redirect_url" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "maxLength" : 30, "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "metadata" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "draft", "completed" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "id", "is_recurring", "name", "pc1_type", "pc2_migration_id", "status" ], "example" : null }, "Pc2MigrationItemFamily" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "pc2_migration_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "is_default" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "metadata" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "draft", "completed" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "id", "is_default", "name", "pc2_migration_id", "status" ], "example" : null }, "Pc2MigrationItemPrice" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc2_migration_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "pc2_migration_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "ref_entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "pc1_item_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan", "addon" ], "example" : null }, "is_recurring" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "is_primary_attached_item" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 5, "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "week", "month", "year", "not_applicable" ], "example" : null }, "is_invalid_pc1_id" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "sanitized_pc1_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "metadata" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "draft", "completed" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "currency_code", "id", "is_invalid_pc1_id", "is_primary_attached_item", "is_recurring", "name", "pc2_migration_id", "pc2_migration_item_id", "status" ], "example" : null }, "Pc2PreviewApproval" : { "type" : "object", "properties" : { "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "approval_required" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "preview_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "approval_details" : { "type" : "object", "deprecated" : false, "properties" : { "rule_name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "version" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "rule_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "stages" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "approver_policy" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "users" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null } }, "required" : [ "email", "name" ], "example" : null }, "example" : null } }, "required" : [ "approver_policy", "name" ], "example" : null }, "example" : null }, "conditions" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "operand" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "operator" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null } }, "required" : [ "operand", "operator" ], "example" : null }, "example" : null } }, "required" : [ "rule_id", "rule_name", "version" ], "example" : null } }, "required" : [ "created_at" ], "example" : null }, "PdfType" : { "type" : "string", "default" : "detailed", "deprecated" : true, "enum" : [ "consolidated", "detailed", "changes_only" ], "example" : null }, "PendingInvoiceCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PendingInvoiceUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PeriodUnit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "week", "month", "year" ], "example" : null }, "PersonalizedOffer" : { "type" : "object", "description" : "

A Personalized Offer represents the best possible offer for a subscriber at a given moment in their lifecycle. It is generated by combining subscriber profile, subscription details, and contextual signals with the plays configured by Growth Managers in the Chargebee Growth dashboard. Learn more about Growth Solutions.\nGrowth Managers define strategic plays that guide customer engagement. Developers then use the Personalized Offers API to fetch and surface these offers within the subscriber experience; whether in an app, portal, checkout flow, websites or communications like email and SMS. Some common plays include:

Note: Growth solutions are currently in Early Access and available only for Chargebee Billing customers at no additional cost during the EAP period. This API is also part of the Early Access Program (EAP). To request access, go to the Chargebee Growth Early Access page in Chargebee Billing.

Features of this object

The Personalized Offers object enables you to:

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the personalized offer.\n", "maxLength" : 50, "example" : null }, "offer_id" : { "type" : "string", "deprecated" : false, "description" : "ID of the base offer configured. This ID is immutable and always refers to the core offer and its latest published version.\n", "maxLength" : 50, "example" : null }, "content" : { "type" : "object", "deprecated" : false, "description" : "

The offer content to display to the user, includes title and description.

\n

Tip\nThe content is formatted in HTML and can be rendered safely in the DOM. However, the code may contain empty <div> elements of the form <div class="slate-p"></div>. Replace these with one or two newlines to preserve the intended line breaks.

", "properties" : { "title" : { "type" : "string", "deprecated" : false, "description" : "The offer headline to display to the end user.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "The offer content or description.\n", "maxLength" : 100, "example" : null } }, "required" : [ "description", "title" ], "example" : null }, "options" : { "type" : "array", "deprecated" : false, "description" : "List of offer options (choices or call-to-action buttons) in this offer.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for a specific option within the offer.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "The text to display on the call-to-action button or link for this option.\n", "maxLength" : 50, "example" : null }, "processing_type" : { "type" : "string", "deprecated" : false, "description" : "

Defines what happens after a customer accepts an offer and how the offer benefit is fulfilled. Learn more.

\n* email -

Chargebee sends an email as configured in Growth, and the fulfillment is processed by your system.

\n* checkout -

The offer is fulfilled by Chargebee via a Chargebee-hosted Checkout flow.

\n* webhook -

Chargebee triggers webhook and fulfillment is processed by your system.

\n* url_redirect -

Chargebee provides the redirect_url as configured in Growth, and the fulfillment is processed by your system.

\n* billing_update -

The offer is fulfilled by Chargebee by applying the offer benefit directly to the subscription.

", "enum" : [ "billing_update", "checkout", "url_redirect", "webhook", "email" ], "example" : null }, "processing_layout" : { "type" : "string", "deprecated" : false, "description" : "Specifies the [UI layout](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/hosted-checkout#ui-layout-options) for Checkout.\n\\* in_app -\n\nUse an embedded checkout experience within the current interface.\n\\* full_page -\n\nRedirect the user to a dedicated full-page checkout.\n", "enum" : [ "in_app", "full_page" ], "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "A URL to which the user should be redirected. Returned only if the offer's processing type is 'url_redirect'\n", "maxLength" : 250, "example" : null } }, "required" : [ "id", "label", "processing_layout", "processing_type", "redirect_url" ], "example" : null }, "example" : null } }, "required" : [ "content", "id", "offer_id", "options" ], "example" : null }, "PlatformAccount" : { "type" : "object", "description" : "

Represents a platform account in Chargebee.\nEach platform account includes a unique id and can optionally include partner_name and partner_description.

", "properties" : { "site_id" : { "type" : "string", "deprecated" : false, "maxLength" : 60, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the platform account. Maximum length is 40 characters.\n", "maxLength" : 40, "example" : null }, "partner_name" : { "type" : "string", "deprecated" : false, "description" : "Name of the partner associated with this platform account. Maximum length is 50 characters.\n", "maxLength" : 50, "example" : null }, "partner_description" : { "type" : "string", "deprecated" : false, "description" : "Description of the partner associated with this platform account. Maximum length is 250 characters.\n", "maxLength" : 250, "example" : null }, "settings_json" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null } }, "required" : [ "id", "site_id" ], "example" : null }, "PortalSession" : { "type" : "object", "description" : "

Customer Portal lets your customers to manage their account and billing themselves. Chargebee supports Single Sign-on (SSO) to access the customer portal. If you already have your own authentication for your website, it allows your authenticated customers to access their portal without having to login again.

Note: You can instead allow your customers to access the portal via login page provided by Chargebee. Read more.

Please follow the below steps for supporting portal access via SSO:

    \n
  1. To enable the "Allow access to customer portal via API", click Settings > Configure Chargebee > Customer Facing Essentials > Checkout and Self Serve Portal > Portal.
  2. \n
  3. Provide a link in your website/application which your authenticated customers can use to access the portal (For example, {your_website_url}/portal_link).
  4. \n
  5. Handle the link request in your server code and create a portal session for the customer by calling Chargebee's "Create a portal session" API
  6. \n
  7. Forward the user to the access URL present in the "Portal Session" resource returned by the above API call.
  8. \n

Notes about access URL:

Using Chargebee's authentication

Note: This feature is not supported in in-app portal.\nChargebee allows you to integrate your website by building user authentication on top of Chargebee. You can also use the portal login to provide authenticated access for your customers to your website pages.\nWorkflow:\nUsers should be redirected to the portal login URL - https://yourdomain.chargebeeportal.com/portal/login by passing the following parameters:

    \n
  • return_url - URL the users should be redirected to upon successful authentication.
  • \n
  • cancel_url - URL the users should be redirected to when they want to go back to your website during login.\nThe domain name used in the Return/Cancel URL should be added as a 'Whitelisted Domain' in Chargebee. Add just the domain name in Chargebee and not the entire URL: E.g. yourdomain.com.
  • \n

Upon successful authentication, a session is created for the user and Chargebee redirects the user to the return_url along with the following parameters:

    \n
  • auth_session_id - Identifier to the authenticated session.
  • \n
  • auth_session_token - Token for the session which should be sent later to activate this session.\nUsing the auth_session_id & auth_session_token, you should call Activate a Portal Session API to validate the session details and create a session for that user in your website.\nNote: The process of setting up the portal account will take place along with the authentication process.
  • \n
Scheduled subscription changes
    \n
  • \n

    When Ramps are disabled, the customer can view and edit the single scheduled change if it exists.

    \n
  • \n
  • \n

    When Ramps are enabled with compatibility mode:

    \n
      \n
    • The customer can view and edit the first ramp if it exists.
    • \n
    • If they edit the subscription, the impacts are the same as those described in the documentation for changes_scheduled_at parameter in the Update subscription API.
    • \n
    \n

    For more details, see Ramps API compatibility mode.

    \n
  • \n
", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier for the portal session.\n", "maxLength" : 70, "example" : null }, "token" : { "type" : "string", "deprecated" : false, "description" : "Unique pre-authenticated portal session token to access customer portal directly.\n", "maxLength" : 70, "example" : null }, "access_url" : { "type" : "string", "deprecated" : false, "description" : "Unique URL for accessing the customer portal. Once accessed, this cannot be reused.\n", "maxLength" : 550, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "URL to redirect when the user logs out from the portal.\n", "maxLength" : 250, "example" : null }, "status" : { "type" : "string", "default" : "created", "deprecated" : false, "description" : "Indicates the current status of the portal session.\n\\* not_yet_activated -\n\nIndicates that the portal session is created and not yet activated for the customer to allow access to your website. This is applicable when you use Chargebee's authentication for your website\n\\* activated -\n\nIndicates that the portal session is activated for the customer to allow access to your website. This is applicable when you use Chargebee's authentication for your website.\n\\* logged_in -\n\nIndicates that the portal session URL has been accessed by the user and the session is active.\n\\* created -\n\nIndicates that the portal session is just created and not yet accessed by the user.\n\\* logged_out -\n\nIndicates that the portal session is logged out either by user or via API.\n", "enum" : [ "created", "logged_in", "logged_out", "not_yet_activated", "activated" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this portal session was generated.\n", "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Specifies when the portal session URL expires. After this time, it is no longer accessible. The expiration time is set to 1 hour after the portal session is created.\n", "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "login_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this portal session URL was accessed by the user.\n", "example" : null }, "logout_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this portal session was logged out either by user or via API.\n", "example" : null }, "login_ipaddress" : { "type" : "string", "deprecated" : false, "description" : "IP Address from which the portal session URL was accessed.\n", "maxLength" : 50, "example" : null }, "logout_ipaddress" : { "type" : "string", "deprecated" : false, "description" : "IP Address from which the portal session was logged out either by user or via API.\n", "maxLength" : 50, "example" : null }, "linked_customers" : { "type" : "array", "deprecated" : false, "description" : "The list of customers for this session\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "has_billing_address" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "The customer has billing address.\n", "example" : null }, "has_payment_method" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "The customer has payment method.\n", "example" : null }, "has_active_subscription" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "The customer has atleast one active subscription.\n", "example" : null } }, "required" : [ "customer_id", "has_active_subscription", "has_billing_address", "has_payment_method" ], "example" : null }, "example" : null } }, "required" : [ "access_url", "created_at", "customer_id", "id", "status", "token" ], "example" : null }, "PriceType" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "PriceVariant" : { "type" : "object", "description" : "Price variant resource offers businesses the flexibility to manage pricing for multiple variations of an [item](/docs/api/items) (plan, addon, or charge) in the Product Catalog. It enables the creation of diverse pricing structures based on variables such as geography, partners, versions, and more. \n**See also:**\nFor a more detailed understanding of Price Variants, including how to enable, configure, and manage them, as well as their impact on other features, follow these resources:\n\n* [Price Variant Overview](https://www.chargebee.com/docs/2.0/variant-pricing-overview.html)\n* [Enabling Price Variant](https://www.chargebee.com/docs/2.0/variant-pricing-enable.html)\n* [Configuring Price Variant](https://www.chargebee.com/docs/2.0/variant-pricing-config.html)\n* [Impacted Features by Price Variant](https://www.chargebee.com/docs/2.0/variant-pricing-impacted-features.html)\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique and immutable identifier of the price variant.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A unique name of the price variant.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the price variant.\n", "maxLength" : 100, "example" : null }, "variant_group" : { "type" : "string", "deprecated" : false, "description" : "

The variant_group\norganizes similar price_variants\nto optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing-\nfor effective grouping. The variant_group\nprovides greater flexibility and precision in your pricing models.

", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the price variant.\n", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Status of a price variant.

\n* active -

Active price variant. This price variant can be attached to item prices\n.

\n* deleted -

Deleted price variant. The id\nand name\nof the deleted price variant can be reused.

\n* archived -

Archived price variant. This price variant is no longer active\nand cannot be attached to new item prices.\nExisting item prices that already have this price variant attached will continue to remain as is.

", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this price variant is created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The version number of this resource. For every change made to the resource, resource_version\nis updated with a new timestamp in milliseconds.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this price variant was last updated.\n", "example" : null }, "archived_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this price variant was archived.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the\nbusiness entity\nof this price_variant.\nThis is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.

\n", "maxLength" : 50, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the price variant has been deleted or not.\n", "example" : null }, "attributes" : { "type" : "array", "deprecated" : false, "description" : "The list of price variant attribute values.\nAttributes 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.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "Attribute name\n", "maxLength" : 100, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "Attribute value\n", "maxLength" : 100, "example" : null } }, "required" : [ "name", "value" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "deleted", "id", "name" ], "example" : null }, "PriceVariantCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "price_variant" : { "$ref" : "#/components/schemas/PriceVariant" }, "attribute" : { "$ref" : "#/components/schemas/Attribute" } }, "required" : [ "attribute", "price_variant" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PriceVariantDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "price_variant" : { "$ref" : "#/components/schemas/PriceVariant" }, "attribute" : { "$ref" : "#/components/schemas/Attribute" } }, "required" : [ "attribute", "price_variant" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PriceVariantUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "price_variant" : { "$ref" : "#/components/schemas/PriceVariant" }, "attribute" : { "$ref" : "#/components/schemas/Attribute" } }, "required" : [ "attribute", "price_variant" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PricingModel" : { "type" : "string", "deprecated" : false, "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "PricingPageSession" : { "type" : "object", "description" : "

The pricing_page_session\nresource allows you to create a pricing page that incorporates customer and subscription details. This page helps customers choose a plan, start a new subscription, or modify an existing one. Each session is distinct and has a limited duration, ensuring a unique and time-sensitive experience.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier generated for each pricing page session requested.\n", "maxLength" : 70, "example" : null }, "url" : { "type" : "string", "deprecated" : false, "description" : "Unique URL for the pricing page that can be included in your website.\n", "maxLength" : 250, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this pricing page session is generated.\n", "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this pricing page session will expire. After this, the pricing page cannot be accessed.\n", "example" : null } }, "example" : null }, "PricingType" : { "type" : "string", "deprecated" : false, "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "Product" : { "type" : "object", "description" : "Products are offerings that can be sold to customers either as one-time purchases or as recurring subscriptions. These products could include physical items, digital goods, or services that are delivered over a period of time. Chargebee's API allows developers to interact with and manipulate product data, enabling businesses to seamlessly integrate their product offerings into their subscription management workflows.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The immutable unique identifier of the product.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "A unique display name for the product. This is visible only in Chargebee.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "This is a unique name appears for each product to the end user.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the product.\n", "maxLength" : 500, "example" : null }, "has_variant" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Whether the product has variants or not.\n", "example" : null }, "status" : { "type" : "string", "default" : "active", "deprecated" : false, "description" : "Status of the product.\n\\* active -\n\nThe active products are visible on the storefront, subscription, or checkout.\n\\* inactive -\n\nThe inactive products are not visible on the storefront, subscription, or checkout.\n", "enum" : [ "active", "inactive" ], "example" : null }, "shippable" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Whether a product is shippable or not.\n", "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the product was created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this product was last updated\n", "example" : null }, "deleted" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Determines if the product is deleted or not. If the value is true\nthen the product has been deleted else it exists. Once the product is deleted, you can reuse the product id\nand name\n.

", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "options" : { "type" : "array", "deprecated" : false, "description" : "Array of option list which helps in the product variant creation.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of an option.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "Name of the option.\n", "maxLength" : 100, "example" : null }, "values" : { "type" : "array", "deprecated" : false, "description" : "List of values for the option.\n", "items" : { "example" : null }, "example" : null }, "default_value" : { "type" : "string", "deprecated" : false, "description" : "Default value for the option.\n", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Type of options.\n\\* select -\n\nselect\n", "enum" : [ "select" ], "example" : null } }, "example" : null }, "example" : null } }, "required" : [ "created_at", "deleted", "external_name", "has_variant", "id", "name", "shippable", "status" ], "example" : null }, "ProductCatalogVersion" : { "type" : "string", "deprecated" : false, "enum" : [ "v1", "v2" ], "example" : null }, "ProductCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product" } }, "required" : [ "product" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ProductDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product" } }, "required" : [ "product" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ProductUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "product" : { "$ref" : "#/components/schemas/Product" } }, "required" : [ "product" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PromotionalCredit" : { "type" : "object", "description" : "These credits can be provided to the customer for promoting the product. You can use Promotional Credits to offer referral bonuses, cash back offers and more. When a customer has promotional credits, it is automatically applied whenever a new invoice is created.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for promotional credits\n", "maxLength" : 150, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Type of promotional credits\n\\* decrement -\n\nDecrement\n\\* increment -\n\nIncrement\n", "enum" : [ "increment", "decrement" ], "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Amount in decimal\n", "maxLength" : 33, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Promotional credits amount\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for promotional credit\n", "maxLength" : 3, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description of this promotional credits.\n", "maxLength" : 250, "example" : null }, "credit_type" : { "type" : "string", "default" : "general", "deprecated" : false, "description" : "Type of promotional credits provided to customer\n\\* referral_rewards -\n\nReferral\n\\* loyalty_credits -\n\nLoyalty Credits\n\\* general -\n\nGeneral\n", "enum" : [ "loyalty_credits", "referral_rewards", "general" ], "example" : null }, "reference" : { "type" : "string", "deprecated" : false, "description" : "Describes why promotional credits were provided\n", "maxLength" : 500, "example" : null }, "closing_balance" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Closing balance as on end date.\n", "minimum" : 0, "example" : null }, "done_by" : { "type" : "string", "deprecated" : false, "description" : "The user who added/deducted the credit. If created via API, this contains the name given for the API key used.\n", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this promotional credit resource is created.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [business entity](/docs/api/business_entities)\nassociated with this promotional credit.\n", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "closing_balance", "created_at", "credit_type", "currency_code", "customer_id", "description", "id", "type" ], "example" : null }, "PromotionalCreditsAddedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit" } }, "required" : [ "customer", "promotional_credit" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PromotionalCreditsDeductedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit" } }, "required" : [ "customer", "promotional_credit" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "PromotionalGrant" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "maxLength" : 36, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null } }, "required" : [ "amount", "expires_at", "subscription_id", "unit_id" ], "example" : null }, "ProrationType" : { "type" : "string", "deprecated" : false, "enum" : [ "full_term", "partial_term", "none" ], "example" : null }, "Purchase" : { "type" : "object", "description" : "

Deprecated\nThe purchase resource and its associated operations on this page are deprecated. Avoid using them in your integrations. The ability to purchase multiple plans in a single subscription will be supported through the Subscriptions API in the future.

The purchase resource represents a collection of item prices bought together. A purchase can contain one or more of the following:

Prerequisite

Purchases must be enabled explicitly for the site. If not already enabled, contact eap@chargebee.com. Purchases require the following features to work so they're automatically enabled along with them:

Note

Once created, Chargebee never modifies a purchase resource; it cannot be modified via API either.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the purchase resource. This is always autogenerated.\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [customer](/docs/api/customers)\nthat made this purchase.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which this purchase was created.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the purchase was modified.\n", "example" : null }, "subscription_ids" : { "type" : "array", "deprecated" : false, "description" : "The unique identifiers of the [subscriptions](/docs/api/subscriptions)\nthat are created as part of this purchase. These IDs remain even when the associated subscriptions have been deleted.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "invoice_ids" : { "type" : "array", "deprecated" : false, "description" : "The unique identifier of the [invoice(s)](/docs/api/invoices)\ncreated immediately as part of this purchase.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "PurchaseCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "purchase" : { "$ref" : "#/components/schemas/Purchase" } }, "required" : [ "purchase" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Quote" : { "type" : "object", "additionalProperties" : true, "description" : "A quote is an estimate of the invoice with the charges likely to occur when customers buy an item. A quote can be converted to a regular invoice once the customer accepts it.\n\nThe line items of a quote are grouped by charge events and are available as a separate [resource](/docs/api/quote_line_groups). This resource can be retrieved using the [List quote line groups](/docs/api/quotes/list-quote-line-groups) endpoint. Note that the first quote line group is available within the quote resource itself and parsing the quote line groups object is not required.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The quote number. Acts as a identifier for quote and typically generated sequentially.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "The quote name will be used as the pdf name of the quote.\n", "maxLength" : 100, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the customer this quote belongs to.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the subscription this quote belongs to.\n", "maxLength" : 50, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the invoice generated while converting this quote.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of this quote.\n\\* open -\n\nThe quote is either newly created, or has been approved but not yet sent to the customer.\n\\* invoiced -\n\nThe accepted quote has been converted into a subscription or one-time charge and invoiced through Chargebee.\n\\* voided -\n\nThe quote has been invalidated and can no longer be acted upon. \n**Note**\n\nApplicable only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n\\* accepted -\n\nThe customer has accepted the quote.\n\\* closed -\n\nThe quote has been marked as closed. \n**Note**\n\nNot applicable when Chargebee CPQ is enabled.\n\\* declined -\n\nThe customer declined/rejected the quote.\n\\* proposed -\n\nThe quote has been shared with the customer via email or e-signature and is awaiting their response. \n**Note**\n\nApplicable only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n\\* expired -\n\nThe quote has passed its expiration date and is no longer valid. \n**Note**\n\nApplicable only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n\\* approval_rejected -\n\nThe quote was rejected with comments, allowing for revisions. \n**Note**\n\nApplicable only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n\\* pending_approval -\n\nThe quote has been submitted for internal approval and is awaiting review. \n**Note**\n\nApplicable only when Chargebee CPQ is enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "example" : null }, "operation_type" : { "type" : "string", "deprecated" : false, "description" : "Operation Type\n\\* onetime_invoice -\n\nonetime_invoice\n\\* create_subscription_for_customer -\n\ncreate_subscription_for_customer\n\\* change_subscription -\n\nchange_subscription\n\\* renew_subscription -\n\nrenew_subscription\n", "enum" : [ "create_subscription_for_customer", "change_subscription", "onetime_invoice", "renew_subscription" ], "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "VAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number)\n", "maxLength" : 20, "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of the quote.\n\\* tax_inclusive -\n\nAll amounts in the document are inclusive of tax.\n\\* tax_exclusive -\n\nAll amounts in the document are exclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quote will be valid till this date. After this date quote will be marked as closed.\n", "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Creation date of the quote. Typically this is the date on which quote is generated.\n", "example" : null }, "total_payable" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total contract value. Applicable when multi billing cycle quote is enabled.\n", "minimum" : 0, "example" : null }, "charge_on_acceptance" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Charge on acceptance. Applicable when multi billing cycle quote is enabled.\n", "minimum" : 0, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Subtotal (in cents) of the first quote line group.\n", "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Total (in cents) of the first quote line group.\n", "minimum" : 0, "example" : null }, "credits_applied" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Credits applied (in cents) for the first quote line group.\n", "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Existing outstanding payments (in cents) if any, applied to the first quote line group.\n", "minimum" : 0, "example" : null }, "amount_due" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Amount due (in cents) for the first quote line group.\n", "minimum" : 0, "example" : null }, "version" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Version of the quote.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this quote was last updated.\n", "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "

An overridden value for the first two characters of the full VAT number.\nOnly applicable specifically for customers with billing_address

\n

country\nas XI\n(which is United Kingdom - Northern Ireland\n).

\n

When you have enabled EU VAT\nin 2021 or have manually enabled\nthe Brexit configuration, you have the option of setting billing_address

\n

country\nas XI.\nThat's the code for United Kingdom - Northern Ireland.\nThe first two characters of the VAT number in such a case is\nXI\nby default. However, if the VAT number was registered in UK, the value should be GB.\nSet\nvat_number_prefix\nto GB\nfor such cases.

", "maxLength" : 10, "example" : null }, "tax_category" : { "type" : "string", "deprecated" : false, "description" : "Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.\n", "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the quote.\n", "maxLength" : 3, "example" : null }, "notes" : { "type" : "array", "deprecated" : false, "description" : "List of notes associated with this quotes.\n", "items" : { "example" : null }, "example" : null }, "contract_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Specifies the contract term's start date.\n", "example" : null }, "contract_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Specifies the contract term's end date. It indicates when the action set in action_at_term_end\ngets triggered.

", "example" : null }, "contract_term_termination_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Specifies the charge to be applied for terminating the contract term.\n", "minimum" : 0, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the [business entity](/docs/api/advanced-features)\nof this quote.\n", "maxLength" : 50, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates that this resource has been deleted when the value is true\n.

", "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total contract value of the quote.\n\n**Note:** This parameter applies only when Chargebee CPQ is enabled. To request access, please contact [support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n", "minimum" : 0, "example" : null }, "total_discount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The total discount value of the quote for the contract period.\n\n**Note:** This parameter applies only when Chargebee CPQ is enabled. To request access, please contact [support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n", "minimum" : 0, "example" : null }, "has_entitlements" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether this quote has entitlement records associated with it.\n", "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "The list of line items for this quote.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this line item belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this line item.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this line item.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the line item.\n", "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "

Quantity of the recurring item\nwhich is represented by this line item. For metered\nline items, this value is updated from usages\nonce when the invoice is generated as pending\nand finally when the invoice is closed\n.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this line item. Typically equals to unit amount x quantity\n", "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models)\nfor this item price.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether this line item is taxed or not\n", "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The tax amount charged for this item\n", "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "Rate of tax used to calculate tax for this lineitem\n", "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this line\n", "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Line Item-level discounts for this line.\n", "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the line item is for a metered item.If true\n, the item is metered; otherwise, it is non-metered.

", "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the line item is percentage-based.\n", "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Invoice Reference Line Item ID\n", "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this line item.\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this item.\n", "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason due to which the line item price/amount is exempted from tax.

\n* zero_value_item -

If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.

\n* reverse_charge -

If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only

\n* tax_not_configured -

If tax is not enabled for the site

\n* high_value_physical_goods -

If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied

\n* tax_not_configured_external_provider -

If the tax is not configured for the country in 3rd party tax provider.

\n* customer_exempt -

If the Customer is marked as Tax exempt

\n* region_non_taxable -

If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction

\n* product_exempt -

If the Plan or Addon is marked as Tax exempt

\n* zero_rated -

If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item

\n* export -

You are not registered for tax in the customer's region. This is also the reason code when both billing_address\nand shipping_address\nhave not been provided for the customer and subscription respectively

", "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this line item belongs to\n", "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for the various line items in this quote.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of deductions applied for each line item of this quote.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique id of the line item that this deduction is for.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id\nis available as entity_id\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice. The entity_id\nis null\nin this case.

\n* item_level_coupon -

The deduction is due to a coupon applied to a line item of the invoice. The coupon id\nis available as entity_id\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on the line items of this quote.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period end of the tax rate for the line item.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the service period start of the tax rate for the line item.\n", "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Indicates the prorated line item amount in cents.\n", "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount\n", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* state -\n\nThe tax jurisdiction is a state\n\\* county -\n\nThe tax jurisdiction is a county\n\\* country -\n\nThe tax jurisdiction is a country\n\\* city -\n\nThe tax jurisdiction is a city\n\\* special -\n\nSpecial tax jurisdiction.\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* other -\n\nJurisdictions other than the ones listed above.\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of all deductions applied to the quote.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this deduction.\n", "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id of the line item that this deduction is for. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of discount that is applied to the line item. Relevant only when discounts[entity_type]\nis one of item_level_discount\n, item_level_coupon\n, document_level_discount\n, or document_level_coupon

\n* percentage -

when percentage is applied as discount

\n* fixed_amount -

when amount is applied as discount

", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a coupon\nor a discount\n, then this is the id\nof the coupon or discount.

", "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "description" : "

The coupon code\n, if applicable, used to provide the discount. The coupon.id\nis available in entity_id\n.

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applicable for this quote.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied. E.g. GST.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the tax item.\n", "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Shipping address for the quote.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Billing address for the quote.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null } }, "required" : [ "currency_code", "customer_id", "date", "deleted", "id", "operation_type", "price_type", "status", "sub_total", "valid_till" ], "example" : null }, "QuoteCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote" } }, "required" : [ "quote" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "QuoteDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote" } }, "required" : [ "quote" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "QuoteEntitlement" : { "type" : "object", "description" : "

Overview

The quote entitlement object represents the entitlement a quote holds for a feature. A quote can have several quote entitlements, each tied to a specific feature and to an entity on the quote (such as a plan price, addon price, or charge price).

How quote entitlements are determined

Quote entitlements are based on the entitlements linked to the item prices on the quote. If an item price lacks an entitlement record for a particular feature, Chargebee considers the entitlement (when available) of its parent item.

You can further customize entitlements by passing entitlement_overrides when creating or editing item-based quotes. When an entitlement has been explicitly overridden on the quote, is_overridden is true and the entitlement takes on the override value.

The method used to derive entitlement levels follows the same rules determined by the feature type as described for subscription entitlements.

Use the List Quote Entitlements API to retrieve the entitlements associated with a quote.

Note\nApplicable only when Chargebee CPQ and Entitlements are enabled. To request access, contact Chargebee Support.

", "properties" : { "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the entity on the quote whose entitlement this record represents.

", "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of the entity on the quote for which this entitlement applies.

\n* charge_price -

Indicates that the entity is an item_price with item_type set to charge.

\n* addon_price -

Indicates that the entity is an item_price with item_type set to addon.

\n* plan_price -

Indicates that the entity is an item_price with item_type set to plan.

", "enum" : [ "plan_price", "addon_price", "charge_price" ], "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [feature](/docs/api/features)\n.\n", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

The level of entitlement that the quote entity has towards the feature. The possible values depend on the value of feature.type\n:

\n\n

See also:\nHow quote entitlements are determined.

", "maxLength" : 50, "example" : null }, "is_enabled" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Indicates whether the entitlement for the feature is enabled for the entity on the quote.\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Start date (UTC timestamp) of this entitlement on the quote. Used with end_date for ramp-scoped entitlements.

", "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

End date (UTC timestamp) of this entitlement on the quote. Used with start_date for ramp-scoped entitlements.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this quote entitlement record was created.\n", "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this quote entitlement record was last modified.\n", "example" : null }, "is_overridden" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the entitlement held by the quote entity for the feature is overridden via an entitlement_overrides record on the quote.

", "example" : null }, "feature_name" : { "type" : "string", "deprecated" : false, "description" : "The [name of the feature](/docs/api/features/feature-object#name)\n.\n", "maxLength" : 50, "example" : null }, "feature_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of measure\nfor the feature when its type\nis either quantity\nor range\n.

", "maxLength" : 50, "example" : null }, "feature_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the [type of the feature](/docs/api/features/feature-object#type)\nassociated with the granted quote entitlement.\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

The display name of the entitlement level that the quote entity holds for the feature. It is derived based on the type\nof feature as follows:

\n", "maxLength" : 50, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if the feature is a metered feature.\n", "example" : null } }, "required" : [ "created_at", "entity_id", "entity_type", "feature_id", "is_enabled", "modified_at" ], "example" : null }, "QuoteLineGroup" : { "type" : "object", "description" : "The line items of a quote are grouped by charge event. Each of these groups is called a quote line group. A quote would have at least one quote line group. Let's look at an example.\n\nConsider the following:\n\n* A monthly plan A for $500 per month.\n* A non-recurring addon B for $50. Now consider a quote that is created for 3 billing cycles of the plan with the addon applied immediately. This quote would be associated with a list of quote line groups: one for each charge event as shown below:\n\n#### Quote Line group 1\n\n**Plan A:**\n$500\n\n**Addon B:**\n$50\n\n**Total:**\n$550\n\n#### Quote Line group 2\n\n**Plan A:**\n$500\n\n**Total:**\n$500\n\n#### Quote Line group 3\n\n**Plan A:**\n$500\n\n**Total:**\n$500\n", "properties" : { "version" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Version of the quote line group.\n", "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a quote line group.\n", "maxLength" : 40, "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Subtotal in cents.\n", "minimum" : 0, "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Total in cents.\n", "minimum" : 0, "example" : null }, "credits_applied" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Credits (in cents) applied to this quote line group.\n", "minimum" : 0, "example" : null }, "amount_paid" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Existing outstanding payments (in cents) if any, applied to this quote line group.\n", "minimum" : 0, "example" : null }, "amount_due" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Amount due in cents\n", "minimum" : 0, "example" : null }, "charge_event" : { "type" : "string", "deprecated" : false, "description" : "Describes the time in the subscription lifecycle when the charge is to occur.\n\\* subscription_creation -\n\nSubscription Creation\n\\* trial_start -\n\nTrial Start\n\\* subscription_renewal -\n\nSubscription Renewal\n\\* subscription_change -\n\nSubscription Change\n\\* subscription_cancel -\n\nSubscription Cancel\n\\* immediate -\n\nImmediate\n", "enum" : [ "immediate", "subscription_creation", "trial_start", "subscription_change", "subscription_renewal", "subscription_cancel" ], "example" : null }, "billing_cycle_number" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The serial number of the billing cycle of which the quote line group is a part.\n", "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "The list of items in this quote line group.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a line_item\n", "maxLength" : 40, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this line item belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this line item.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this line item.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the line item.\n", "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "

Quantity of the recurring item\nwhich is represented by this line item. For\nmetered\nline items, this value is updated from\nusages\nonce when the invoice is generated as\npending\nand finally when the invoice is\nclosed\n.

", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this line item. Typically equals to unit amount x quantity\n", "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The\n[pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models)\nfor this item price.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_taxed" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies whether this line item is taxed or not\n", "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The tax amount charged for this item\n", "minimum" : 0, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "Rate of tax used to calculate tax for this lineitem\n", "maximum" : 100, "minimum" : 0, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the unit amount of the line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity of this line_item. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the line_item\n, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this line\n", "minimum" : 0, "example" : null }, "item_level_discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Line Item-level discounts for this line.\n", "minimum" : 0, "example" : null }, "metered" : { "type" : "boolean", "deprecated" : false, "example" : null }, "is_percentage_pricing" : { "type" : "boolean", "deprecated" : false, "example" : null }, "reference_line_item_id" : { "type" : "string", "deprecated" : false, "description" : "Invoice Reference Line Item ID\n", "maxLength" : 40, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this line item.\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this item.\n", "maxLength" : 500, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* addon -\n\nIndicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/v2/pcv-1/addons/addon-object)\nid\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n\\* plan_setup -\n\nIndicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/v2/pcv-1/plans/plan-object)\nid\n\\* plan -\n\nIndicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/v2/pcv-1/plans/plan-object)\nid\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "tax_exempt_reason" : { "type" : "string", "deprecated" : false, "description" : "

The reason due to which the line item price/amount is exempted from tax.

\n* reverse_charge -

If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only

\n* tax_not_configured -

If tax is not enabled for the site

\n* high_value_physical_goods -

If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied

\n* product_exempt -

If the Plan or Addon is marked as Tax exempt

\n* zero_rated -

If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item

\n* customer_exempt -

If the Customer is marked as Tax exempt

\n* region_non_taxable -

If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction

\n* export -

You are not registered for tax in the customer's region. This is also the reason code when both billing_address\nand shipping_address\nhave not been provided for the customer and subscription respectively

", "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer this line item belongs to\n", "maxLength" : 100, "example" : null }, "proration_mode" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null } }, "required" : [ "date_from", "date_to", "description", "entity_type", "is_taxed", "unit_amount" ], "example" : null }, "example" : null }, "line_item_discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discount(s) applied for line items in this quote line group.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique id of the line item that this deduction is for.\n", "maxLength" : 50, "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* item_level_coupon -

The deduction is due to a coupon applied to a line item of the invoice. The coupon id\nis available as entity_id\n.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id\nis available as entity_id\n.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice. The entity_id\nis null\nin this case.

", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a\ncoupon\nor a\ndiscount\n, then this is the\nid\nof the coupon or discount.

", "maxLength" : 50, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null } }, "required" : [ "discount_amount", "discount_type", "line_item_id" ], "example" : null }, "example" : null }, "line_item_taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied on line items in this quote line group.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "The unique reference id of the line item for which the tax is applicable\n", "maxLength" : 40, "example" : null }, "tax_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied\n", "maxLength" : 100, "example" : null }, "tax_rate" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "description" : "The rate of tax used to calculate tax amount\n", "maximum" : 100, "minimum" : 0, "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "prorated_taxable_amount" : { "type" : "number", "format" : "decimal", "deprecated" : false, "maximum" : 1000000000, "minimum" : -1000000000, "example" : null }, "is_partial_tax_applied" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if tax is applied only on a portion of the line item amount.\n", "example" : null }, "is_non_compliance_tax" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates the non-compliance tax that should not be reported to the jurisdiction.\n", "example" : null }, "taxable_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the actual portion of the line item amount that is taxable.\n", "minimum" : 0, "example" : null }, "tax_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount\n", "minimum" : 0, "example" : null }, "tax_juris_type" : { "type" : "string", "deprecated" : false, "description" : "The type of tax jurisdiction\n\\* unincorporated -\n\nCombined tax of state and county.\n\\* federal -\n\nThe tax jurisdiction is a federal\n\\* state -\n\nThe tax jurisdiction is a state\n\\* county -\n\nThe tax jurisdiction is a county\n\\* country -\n\nThe tax jurisdiction is a country\n\\* city -\n\nThe tax jurisdiction is a city\n\\* other -\n\nJurisdictions other than the ones listed above.\n\\* special -\n\nSpecial tax jurisdiction.\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "tax_juris_name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax jurisdiction\n", "maxLength" : 250, "example" : null }, "tax_juris_code" : { "type" : "string", "deprecated" : false, "description" : "The tax jurisdiction code\n", "maxLength" : 250, "example" : null }, "tax_amount_in_local_currency" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.\n", "minimum" : 0, "example" : null }, "local_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.\n", "maxLength" : 3, "example" : null } }, "required" : [ "tax_amount", "tax_name", "tax_rate", "taxable_amount" ], "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "The list of discounts applied to this quote line group.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this deduction.\n", "maxLength" : 250, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique id of the line item that this deduction is for. Is required when discounts[entity_type]\nis item_level_coupon\nor document_level_coupon\n.

", "maxLength" : 40, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount to which it is applied.

\n* document_level_coupon -

The deduction is due to a coupon applied to the invoice sub_total.\nThe coupon id is passed as entity_id\n.

\n* prorated_credits -

The deduction is due to a legacy adjustment credit applied to the invoice. The entity_id\nis null\nin this case. The legacy credits feature is superseded by adjustment_credit_notes\n.

\n* item_level_coupon -

The deduction is due to a coupon applied to line item. The coupon id\nis passed as entity_id\n.

\n* item_level_discount -

The deduction is due to a discount\napplied to a line item of the invoice. The discount id\nis available as the entity_id.

\n\n* promotional_credits -

The deduction is due to a promotional credit\napplied to the invoice.

\n* document_level_discount -

The deduction is due to a discount\napplied to the invoice sub_total.\nThe discount id\nis available as the entity_id.

\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits", "prorated_credits", "item_level_discount", "document_level_discount" ], "example" : null }, "discount_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of discount that is applied to the line item. Relevant only when discounts[entity_type]\nis one of item_level_discount\n, item_level_coupon\n, document_level_discount\n, or document_level_coupon

\n* percentage -

when percentage is applied as discount

\n* fixed_amount -

when amount is applied as discount

", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction is due to a\ncoupon\nor a\ndiscount\n, then this is the\nid\nof the coupon or discount.

", "maxLength" : 100, "example" : null }, "coupon_set_code" : { "type" : "string", "deprecated" : false, "description" : "

The coupon code\n, if applicable, used to provide the discount. The coupon.id\nis available in entity_id\n.

", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "example" : null }, "taxes" : { "type" : "array", "deprecated" : false, "description" : "The list of taxes applied to this quote line group.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the tax applied. E.g. GST.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The tax amount.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the tax item.\n", "maxLength" : 250, "example" : null } }, "required" : [ "amount", "name" ], "example" : null }, "example" : null } }, "required" : [ "sub_total" ], "example" : null }, "QuoteType" : { "type" : "string", "deprecated" : true, "enum" : [ "amendment", "renewal" ], "example" : null }, "QuoteUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote" } }, "required" : [ "quote" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "QuotedCharge" : { "type" : "object", "description" : "

When the\noperation_type\nof a\nquote\nis\nonetime_invoice\n, the\nquoted_charges\nresource contains the details of the invoice that is eventually created once the quote is invoiced. It is always returned along with the quote.

", "properties" : { "charges" : { "type" : "array", "deprecated" : false, "description" : "Provides details of all the ad-hoc charges\n[added to the quote](/docs/api/quotes/create-a-quote-for-charge-and-charge-items)\n.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the amount for the one-time charge. The value is in [major units of the currency](/docs/api/getting-started).\nApplicable only when multi-decimal pricing is enabled.\n", "maxLength" : 39, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this charge\n", "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "service_period_in_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the service period of the charge in days. When the quote is converted, the invoice.line_item.date_from\nis set to current date/time and invoice.line_item.date_to\nis set to service_period_in_days\nahead of date_from\n.

", "maximum" : 4000, "minimum" : 1, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "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)\nintegration.\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n\\* retail -\n\nTransaction is a sale to an end user\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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)\nintegration.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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)\nintegration.\n", "example" : null } }, "example" : null }, "example" : null }, "invoice_items" : { "type" : "array", "deprecated" : false, "description" : "Details of individual [item prices](/docs/api/item_prices)\nthat are part of this subscription\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "A unique ID for your system to identify the item price.\n", "maxLength" : 100, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Item price quantity\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price or per-unit-price of the item price. By default, it is the value set\nfor the item_price.\nThis is only applicable when the pricing_model\nof the item_price\nis flat_fee\nor per_unit.\nThe value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 39, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "entity_description" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "service_period_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Defines service period of the item in days from the day of charge.\n", "maximum" : 730, "minimum" : 1, "example" : null } }, "required" : [ "item_price_id" ], "example" : null }, "example" : null }, "item_tiers" : { "type" : "array", "deprecated" : false, "description" : "

The pricing details of subscription_items\nwhich have pricing_model\nas tiered\n, volume\nor stairstep.\nLearn more\nabout pricing models.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item price to which this tier belongs.\n", "maxLength" : 100, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lowest value in the quantity tier.\n", "minimum" : 1, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The highest value in the quantity tier.\n", "example" : null }, "price" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "index" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The index number of the subscription to which the item price is added. Provide a unique number between 0\nand 4\n(inclusive) for each subscription that is to be created.

", "minimum" : 0, "example" : null } }, "required" : [ "index", "item_price_id", "price", "starting_unit" ], "example" : null }, "example" : null }, "coupons" : { "type" : "array", "deprecated" : false, "description" : "List of coupons for this charge\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "Used to uniquely identify the coupon\n", "maxLength" : 100, "example" : null } }, "required" : [ "coupon_id" ], "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "List of discounts for the charges in this quote.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique id for the discount. It is always auto-generated.\n", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the discount as it should appear on customer-facing pages and documents such as invoices\nand hosted pages.\nThis is auto-generated based on the type\n, amount\n, and currency_code\nof the discount. For example, it can be 10% off\nor 10$ off\n.

", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "

The type of discount.\nPossible value are:

\n* offer_quantity -

A specified number of units of the item price are offered for free. The number of free units is specified in quantity.\nThe offer_quantity\noption is valid only when apply_on\nis set to each_specified_item\nand the pricing_model\nof the item price is per_unit\n.

\n* percentage -

The specified percentage will be given as discount.

\n* fixed_amount -

The specified amount will be given as discount.

", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "The percentage of the original amount that should be deducted from it.\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "minimum" : 0, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the number of free units provided for the item, without affecting the total quantity sold. This parameter is applicable only when discount.type\nis offer_quantity.

\n", "minimum" : 1, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The currency code (ISO 4217 format\n) of the discount. This is only applicable when discount.type\nis fixed_amount\n.

", "maxLength" : 3, "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this discount is created.\n", "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

", "maxLength" : 100, "example" : null }, "index" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The index number of the subscription to which the item price is added. Provide a unique number between 0\nand 4\n(inclusive) for each subscription that is to be created.

", "minimum" : 0, "example" : null } }, "required" : [ "apply_on", "coupon_id", "created_at", "id", "index", "type" ], "example" : null }, "example" : null }, "coupon_applicability_mappings" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "applicable_item_price_ids" : { "type" : "array", "deprecated" : false, "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "example" : null } }, "example" : null }, "QuotedDeltaRamp" : { "type" : "object", "properties" : { "line_items" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_level_discount_per_billing_cycle_in_decimal" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null } }, "example" : null }, "example" : null } }, "example" : null }, "QuotedRamp" : { "type" : "object", "description" : "

When a quote is created, it generates the quoted_ramps resource. This captures most of the details of the ramps that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.

Note\nApplicable only when Chargebee CPQ and Subscription Ramps are enabled. To request access, contact Chargebee Support.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "Provides details of the individual line items in the subscription. If the subscription includes ramps, this array contains line items from all ramps.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the item price.\n", "maxLength" : 100, "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of item. There must be one and only one item of type plan\nin this list.

\n* charge -

Charge

\n* addon -

Addon

\n* plan -

Plan

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The quantity of the item purchased\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency.

", "minimum" : 0, "example" : null }, "unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 39, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The total amount for the item as determined from unit_price\n, free_quantity\n, quantity\nand item_tiers\nas applicable. The value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the total amount for the item, in major units of the currency. Always returned when [multi-decimal pricing](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 39, "example" : null }, "billing_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The interval between consecutive billing cycles for the subscription item. The interval is measured in the units defined by billing_period_unit\n.

", "minimum" : 1, "example" : null }, "billing_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of measurement used to define the billing_period\nfor the subscription item.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The free_quantity\nof the plan-item as specified\nfor the item price.

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The free_quantity_in_decimal\nas set for the item price. Returned for quantity-based item prices when multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "minimum" : 0, "example" : null }, "service_period_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The service period of the item in days from the day of charge.\n", "maximum" : 730, "minimum" : 1, "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "example" : null }, "charge_on_option" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Specifies the start date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

", "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Specifies the end date for the item price in the subscription. The period of the item price, determined by the start_date and end_date, specifies the ramp it belongs to.

", "example" : null }, "ramp_tier_id" : { "type" : "string", "deprecated" : false, "description" : "

The index or identifier of the ramp to which the item price belongs. This index is used to map item_tier[i] values to the correct ramp, as the target item_price of an item_tier may be part of multiple ramps.

", "maxLength" : 105, "example" : null }, "discount_per_billing_cycle" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Specifies the discount amount applied to a line item per billing cycle. This includes both item-level and invoice-level discounts.\nExample: Consider a monthly quote that includes a plan, an addon, a $50 discount on the plan, and an additional $100 invoice-level discount. In this case, discount_per_billing_cycle for the plan would be ($50 + $100 ÷ 2) = $100.

", "minimum" : 0, "example" : null }, "discount_per_billing_cycle_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the discount amount applied to a line item per billing cycle, in decimal format. The value is expressed in the major currency units. This attribute is available only when Multi-Decimal Pricing is enabled.\nSee also:discount_per_billing_cycle.

", "maxLength" : 39, "example" : null }, "item_level_discount_per_billing_cycle" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Specifies the item-level discount amount applied to a line item per billing cycle. This does not include invoice-level discounts.\nExample: Consider a monthly quote that includes a plan, an addon, a $50 discount on the plan, and an additional $100 invoice-level discount. In this case, item_level_discount_per_billing_cycle for the plan would be $50.

", "minimum" : 0, "example" : null }, "item_level_discount_per_billing_cycle_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the item-level discount amount applied to a line item per billing cycle, in decimal format. The value is expressed in the major currency units. This attribute is available only when Multi-Decimal Pricing is enabled.\nSee also:item_level_discount_per_billing_cycle.

", "maxLength" : 39, "example" : null }, "amount_per_billing_cycle" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Specifies the amount for this line item before discounts.\n**Example:**Consider a monthly quote that includes a $500 plan, an addon, a $50 discount on the plan, and an additional $100 invoice-level discount. In this case, amount_per_billing_cycle for the plan would be $500.

", "minimum" : 0, "example" : null }, "amount_per_billing_cycle_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the amount for this line item before discounts, in decimal format. The value is expressed in the major currency units. This attribute is available only when Multi-Decimal Pricing is enabled.\nSee also:amount_per_billing_cycle.

", "maxLength" : 39, "example" : null }, "net_amount_per_billing_cycle" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Specifies the amount for this line item after discounts.\nExample: Consider a monthly quote that includes a $500 plan, an addon, a $50 discount on the plan, and an additional $100 invoice-level discount. In this case, net_amount_per_billing_cycle for the plan would be ($500 - ($50 + $100 ÷ 2)) = $400.

", "minimum" : 0, "example" : null }, "net_amount_per_billing_cycle_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the amount for this line item after discounts, in decimal format. The value is expressed in the major currency units. This attribute is available only when Multi-Decimal Pricing is enabled.\nSee also:net_amount_per_billing_cycle.

", "maxLength" : 39, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 2000, "example" : null } }, "required" : [ "item_price_id", "item_type" ], "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "List of discounts for this quoted subscription.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique id for the discount. It is always auto-generated.\n", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the discount as it should appear on customer-facing pages and documents such as invoices\nand hosted pages.\nThis is auto-generated based on the type\n, amount\n, and currency_code\nof the discount. For example, it can be 10% off\nor 10$ off\n.

", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "The type of discount.\nPossible value are:\n\\* fixed_amount -\n\nThe specified amount will be given as discount.\n\\* percentage -\n\nThe specified percentage will be given as discount.\n", "enum" : [ "fixed_amount", "percentage" ], "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "The percentage of the original amount that should be deducted from it.\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "minimum" : 0, "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of deduction and the amount it applies to.

\n* document_level_coupon -

The deduction comes from a coupon applied at the invoice level. The coupon id is available in the entity_id attribute.

\n* item_level_coupon -

The deduction comes from a coupon applied to a specific line item. The coupon id is available in the entity_id attribute.

\n* item_level_discount -

The deduction comes from a discount applied to a specific line item. The discount id is available in the entity_id attribute.

\n* document_level_discount -

The deduction comes from a discount applied at the invoice level. The discount id is available in the entity_id attribute.

", "enum" : [ "item_level_coupon", "document_level_coupon", "item_level_discount", "document_level_discount" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "

When the deduction results from a coupon or a discount, this attribute contains the id of that coupon or discount.

", "maxLength" : 100, "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this discount is created.\n", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Specifies the start date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

", "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Specifies the end date for the discount. The period of the discount, as specified by the start_date and end_date determines the ramp(s) it will be part of.

", "example" : null } }, "required" : [ "apply_on", "created_at", "duration_type", "entity_type", "id", "included_in_mrr", "type" ], "example" : null }, "example" : null }, "item_tiers" : { "type" : "array", "deprecated" : false, "description" : "List of item tier.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item price to which this tier belongs.\n", "maxLength" : 100, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lowest value in the quantity tier.\n", "minimum" : 1, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The highest value in the quantity tier.\n", "example" : null }, "price" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "ramp_tier_id" : { "type" : "string", "deprecated" : false, "description" : "

The index or identifier of the ramp to which this tier information belongs. This is a value from the line_items[i].ramp_tier_id. Since an item price can be part of multiple subscriptions ramps, this group ID specifies the ramp to which this tier information belongs.

", "maxLength" : 105, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20, consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "item_price_id", "price", "starting_unit" ], "example" : null }, "example" : null }, "coupon_applicability_mappings" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "coupon_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "applicable_item_price_ids" : { "type" : "array", "deprecated" : false, "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "example" : null } }, "required" : [ "id" ], "example" : null }, "QuotedSubscription" : { "type" : "object", "description" : "

When a quote is created, it generates the quoted_subscription resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "billing_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "billing_period_unit" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Applicable only when operation_type\nof the quote is create_subscription_for_customer.\nFor subscriptions in the future\nstatus\n, this is the date/time when the subscription is set to start. The quote can be converted on a date/time after this date. This is called backdating the subscription creation. Backdating is performed when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:

\n", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End of the trial period for the subscription. Presence of this value for 'future' subscription implies the subscription will go into 'in_trial' state when it starts.\n", "example" : null }, "remaining_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : 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.\n* When the subscription is on a [contract term](/docs/api/contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle.\n", "minimum" : 0, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "on", "off" ], "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Returned for quantity-based plans when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Applicable only when operation_type\nof the quote is change_subscription.\nWhen change_option\nis set to specific_date\n, then this is the date/time at which the subscription change is scheduled to occur. The quote can be converted on a date/time after this date. This is called backdating the subscription change and performed when the subscription change has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:

\n", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "

Applicable only when operation_type\nof the quote is change_subscription.\nWhen the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.

\n* end_of_term -

The change is scheduled to be carried out at the end of the billing cycle of the subscription.

\n* specific_date -

The change is carried out as of changes_scheduled_at\n.

\n* immediately -

The change is carried out immediately upon quote conversion.

", "enum" : [ "end_of_term", "specific_date", "immediately" ], "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The period of time by which the first term of the subscription is extended free of charge. The value is expressed in the time unit specified by free_period_unit. For example, 3 with free_period_unit = month means 3 free months are added to the first term.

\n

Constraints

", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The time unit for free_period.

\n

Constraints

\n* week -

Charge based on week(s)

\n* month -

Charge based on month(s)

\n* day -

Charge based on day(s)

\n* year -

Charge based on year(s)

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "coupons" : { "type" : "array", "deprecated" : false, "description" : "List of coupons for this subscription\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "Used to uniquely identify the coupon\n", "maxLength" : 100, "example" : null } }, "required" : [ "coupon_id" ], "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "List of discounts for this quoted subscription.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique id for the discount. It is always auto-generated.\n", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the discount as it should appear on customer-facing pages and documents such as invoices\nand hosted pages.\nThis is auto-generated based on the type\n, amount\n, and currency_code\nof the discount. For example, it can be 10% off\nor 10$ off\n.

", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "

The type of discount.\nPossible value are:

\n* fixed_amount -

The specified amount will be given as discount.

\n* offer_quantity -

A specified number of units of the item price are offered for free. The number of free units is specified in quantity.\nThe offer_quantity\noption is valid only when apply_on\nis set to each_specified_item\nand the pricing_model\nof the item price is per_unit\n.

\n* percentage -

The specified percentage will be given as discount.

", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "The percentage of the original amount that should be deducted from it.\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "minimum" : 0, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the number of free units provided for the item, without affecting the total quantity sold. This parameter is applicable only when discount.type\nis offer_quantity.

\n", "minimum" : 1, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The currency code (ISO 4217 format\n) of the discount. This is only applicable when discount.type\nis fixed_amount\n.

", "maxLength" : 3, "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this discount is created.\n", "example" : null }, "apply_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Specifies till when the limited period discount is applicable. This attribute will be sent in the response only for limited_period\nduration type discount.

", "example" : null }, "applied_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Specifies the number of times the discount has been applied.\n", "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

", "maxLength" : 100, "example" : null }, "index" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The index number of the subscription to which the item price is added. Provide a unique number between 0\nand 4\n(inclusive) for each subscription that is to be created.

", "minimum" : 0, "example" : null } }, "required" : [ "apply_on", "coupon_id", "created_at", "duration_type", "id", "included_in_mrr", "index", "type" ], "example" : null }, "example" : null }, "subscription_items" : { "type" : "array", "deprecated" : false, "description" : "Details of individual [item prices](/docs/api/item_prices)\nthat are part of this subscription\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the item price.\n", "maxLength" : 100, "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of item. There must be one and only one item of type plan\nin this list.

\n* plan -

Plan

\n* charge -

Charge

\n* addon -

Addon

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The quantity of the item purchased\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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.

", "minimum" : 0, "example" : null }, "unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 39, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The total amount for the item as determined from unit_price\n, free_quantity\n, quantity\nand item_tiers\nas applicable. The value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "current_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The beginning of the item's current billing period. \n**Note**\nApplicable only when multi-frequency billing is enabled. \n**Private Beta**\nMulti-frequency billing is in private beta. Please reach out to the Chargebee [support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "example" : null }, "current_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end of the item's current billing period. Chargebee renews the item immediately following this date. \n**Note**\nApplicable only when multi-frequency billing is enabled. \n**Private Beta**\nMulti-frequency billing is in private beta. Please reach out to the Chargebee [support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "example" : null }, "next_billing_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date or time at when the next billing for the item is scheduled to occur. This typically occurs immediately after current_term_end.

\n

Note\nApplicable only when multi-frequency billing is enabled.

\n

Private Beta\nMulti-frequency billing is in private beta. Please reach out to the Chargebee support to enable this feature.

", "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the total amount for the item, in major units of the currency. Always returned when [multi-decimal pricing](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 39, "example" : null }, "billing_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The interval between consecutive billing cycles for the subscription item. The interval is measured in the units defined by billing_period_unit\n.

", "minimum" : 1, "example" : null }, "billing_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of measurement used to define the billing_period\nfor the subscription item.

\n* year -

A period of 1 calendar year.

\n* week -

A period of 7 days.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The free_quantity\nof the plan-item as specified\nfor the item price.

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The free_quantity_in_decimal\nas set for the item price. Returned for quantity-based item prices when multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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)\n--addon-items as well.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "minimum" : 0, "example" : null }, "service_period_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The service period of the item in days from the day of charge.\n", "maximum" : 730, "minimum" : 1, "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "example" : null }, "charge_on_option" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "proration_type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "full_term", "partial_term", "none" ], "example" : null }, "usage_accumulation_reset_frequency" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "never", "subscription_billing_frequency" ], "example" : null } }, "required" : [ "item_price_id", "item_type" ], "example" : null }, "example" : null }, "item_tiers" : { "type" : "array", "deprecated" : false, "description" : "List of item tier.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item price to which this tier belongs.\n", "maxLength" : 100, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lowest value in the quantity tier.\n", "minimum" : 1, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The highest value in the quantity tier.\n", "example" : null }, "price" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "index" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The index number of the subscription to which the item price is added. Provide a unique number between 0\nand 4\n(inclusive) for each subscription that is to be created.

", "minimum" : 0, "example" : null } }, "required" : [ "index", "item_price_id", "price", "starting_unit" ], "example" : null }, "example" : null }, "quoted_contract_term" : { "type" : "object", "deprecated" : false, "description" : "The details of the contract term to be created when this quote is invoiced.\n", "properties" : { "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the contract term\n", "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* renew - \n* 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.

\n\n* cancel -

Contract term completes and subscription is canceled.

\n* evergreen -

Contract term completes and the subscription renews.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The sum of the totals\nof all the invoices raised as part of the contract term. For active\ncontract terms, this is a predicted value. The value depends on the type of currency.\nIf the subscription was imported\nwith the contract term, then this value includes the value passed for total_amount_raised\n.

", "minimum" : 0, "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null } }, "required" : [ "action_at_term_end", "billing_cycle", "contract_end", "contract_start", "total_contract_value" ], "example" : null } }, "required" : [ "id" ], "example" : null }, "Ramp" : { "type" : "object", "description" : "

A ramp resource, or subscription ramp, represents a planned change to a subscription that occurs at a future date. Use this resource to define and schedule subscription modifications, such as updating pricing, altering quantity, or transitioning to a different plan, without immediately applying them.

Note

Auto-draft conditions

When you create or update a ramp, Chargebee automatically moves any existing ramps scheduled after that ramp to draft status if either of the following conditions is met:

    \n
  • The new or updated ramp changes the subscription term end date.
  • \n
  • The new or updated ramp changes the subscription billing frequency. That is, either of the following attributes is changed:\n
      \n
    • subscription_items[i].billing_period
    • \n
    • subscription_items[i].billing_period_unit
    • \n
    • where i is the index where subscription_items[i].item_type is plan.
    • \n
    \n
  • \n
  • The new or updated ramp introduces an addon that is not applicable to the plan in one or more of the subsequent ramps.
  • \n
", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the ramp.\n", "maxLength" : 50, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "A brief summary of the pricing changes applied with this ramp.\n", "maxLength" : 250, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the subscription for which this ramp was created.\n", "maxLength" : 50, "example" : null }, "effective_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Specifies the time when the changes to the subscription will be applied by executing the ramp.\n", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The execution status of the ramp

\n* succeeded -

The ramp completed successfully.

\n* scheduled -

The ramp has been created and scheduled for execution.

\n

Note\nExcluding deleted ramps, a subscription can have a maximum of 12 ramps in the scheduled status.

\n* draft -

The ramp is moved to draft\nstatus when the associated subscription is updated. The reason for the draft status can be explained in the status_transition_reason

\n

Note\nRamps in draft state will not be executed.

\n* failed -

The ramp did not complete because of an error.

", "enum" : [ "scheduled", "succeeded", "failed", "draft" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this resource was created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this resource was last updated.\n", "example" : null }, "items_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [item prices](/docs/api/item_prices)\nremoved from the subscription through this ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "coupons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [coupons](/docs/api/coupons)\nremoved from the subscription through this ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "discounts_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of [discounts](/docs/api/discounts)\nremoved from the subscription through this ramp.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the ramp is marked as deleted. To retrieve deleted ramps, use the List subscription ramps\nendpoint with include_deleted\nset to true\n.

", "example" : null }, "items_to_add" : { "type" : "array", "deprecated" : false, "description" : "Details about the [item prices](/docs/api/item_prices)\nadded to the subscription through this ramp.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the item price.\n", "maxLength" : 100, "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of item. There must be one and only one item of type plan\nin this list.

\n* charge -

Charge

\n* plan -

Plan

\n* addon -

Addon

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The quantity of the item purchased\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The total amount for the item as determined from unit_price\n, free_quantity\n, quantity\nand item_tiers\nas applicable. The value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the total amount for the item, in major units of the currency. Always returned when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The quantity of the item price that is available for free. Only the quantity more than this will be charged for the subscription. This is the same as item_price.free_quantity\n.

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The free_quantity_in_decimal\nas set for the item price. Returned for quantity-based item prices when multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "minimum" : 0, "example" : null }, "service_period_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The service period of the item in days from the day of charge.\n", "maximum" : 730, "minimum" : 1, "example" : null }, "metered_quantity" : { "type" : "string", "deprecated" : false, "description" : "This field represents the number of quantities recorded against this subscription item in the current term\n", "maxLength" : 100, "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "example" : null }, "charge_on_option" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* immediately -

The item is charged immediately on being added to the subscription.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

", "enum" : [ "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null } }, "required" : [ "item_price_id", "item_type" ], "example" : null }, "example" : null }, "items_to_update" : { "type" : "array", "deprecated" : false, "description" : "Details about the [item prices](/docs/api/item_prices)\nupdated in the subscription through this ramp.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the item price.\n", "maxLength" : 100, "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of item. There must be one and only one item of type plan\nin this list.

\n* charge -

Charge

\n* plan -

Plan

\n* addon -

Addon

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The quantity of the item purchased\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 39, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The total amount for the item as determined from unit_price\n, free_quantity\n, quantity\nand item_tiers\nas applicable. The value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the total amount for the item, in major units of the currency. Always returned when [multi-decimal pricing](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 39, "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The quantity of the item price that is available for free. Only the quantity more than this will be charged for the subscription. This is the same as item_price.free_quantity\n..

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The free_quantity_in_decimal\nas set for the item price. Returned for quantity-based item prices when multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "minimum" : 0, "example" : null }, "service_period_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The service period of the item in days from the day of charge.\n", "maximum" : 730, "minimum" : 1, "example" : null }, "metered_quantity" : { "type" : "string", "deprecated" : false, "description" : "This field represents the number of quantities recorded against this subscription item in the current term\n", "maxLength" : 100, "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "example" : null }, "charge_on_option" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

\n* immediately -

The item is charged immediately on being added to the subscription.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

", "enum" : [ "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null } }, "required" : [ "item_price_id", "item_type" ], "example" : null }, "example" : null }, "coupons_to_add" : { "type" : "array", "deprecated" : false, "description" : "Details about the [coupons](/docs/api/coupons)\nadded to the subscription through this ramp.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "Unique ID of the coupon to be added.\n", "maxLength" : 100, "example" : null }, "apply_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date till when the coupon can be applied. Applicable for limited_period\ncoupons\nonly.

", "example" : null } }, "required" : [ "coupon_id" ], "example" : null }, "example" : null }, "discounts_to_add" : { "type" : "array", "deprecated" : false, "description" : "Details about the [discounts](/docs/api/discounts)\nadded to the subscription through this ramp.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique id for the discount. It is always auto-generated.\n", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the discount as it should appear on customer-facing pages and documents such as invoices\nand hosted pages.\nThis is auto-generated based on the type\n, amount\n, and currency_code\nof the discount. For example, it can be 10% off\nor 10$ off\n.

", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "The type of discount.\nPossible value are:\n\\* fixed_amount -\n\nThe specified amount will be given as discount.\n\\* percentage -\n\nThe specified percentage will be given as discount.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "

The percentage of the original amount that should be deducted from it. Only applicable when discount.type\nis percentage.

\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "minimum" : 0, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this discount is created.\n", "example" : null } }, "required" : [ "apply_on", "created_at", "duration_type", "id", "included_in_mrr", "type" ], "example" : null }, "example" : null }, "item_tiers" : { "type" : "array", "deprecated" : false, "description" : "

Note\nAllowed only when both of these conditions are met:

\n

Overrides the item_tiers for specific item_prices of the subscription.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item price to which this tier belongs.\n", "maxLength" : 100, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lowest value in the quantity tier.\n", "minimum" : 1, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The highest value in the quantity tier.\n", "example" : null }, "price" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null }, "index" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Not used.\n", "minimum" : 0, "example" : null } }, "required" : [ "index", "item_price_id", "price", "starting_unit" ], "example" : null }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "An object that specifies the contract term details.\n", "properties" : { "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null }, "renewal_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - \n* renew_once -

Used when you want to renew the contract term just once. Does the following:

\n\n* cancel -

Contract term completes and subscription is canceled.

", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null } }, "required" : [ "action_at_term_end" ], "example" : null }, "status_transition_reason" : { "type" : "object", "deprecated" : false, "description" : "

Detailed reason for the status transition of a ramp to draft\nand failed\nstatus.

", "properties" : { "code" : { "type" : "string", "deprecated" : false, "description" : "

Unique code of the status_transition_reason\n.

", "maxLength" : 100, "example" : null }, "message" : { "type" : "string", "deprecated" : false, "description" : "

A message to explain the status_transition_reason\n.

", "maxLength" : 250, "example" : null } }, "example" : null }, "entitlement_overrides_to_add" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "plan_price", "addon_price", "charge" ], "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "is_enabled" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null } }, "required" : [ "entity_id", "entity_type", "feature_id", "is_enabled" ], "example" : null }, "example" : null }, "entitlement_overrides_to_update" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "plan_price", "addon_price", "charge" ], "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "is_enabled" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null } }, "required" : [ "entity_id", "entity_type", "feature_id", "is_enabled" ], "example" : null }, "example" : null }, "entitlement_overrides_to_remove" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "plan_price", "addon_price", "charge" ], "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, "required" : [ "entity_id", "entity_type", "feature_id" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "deleted", "effective_from", "id", "status", "subscription_id" ], "example" : null }, "ReasonCode" : { "type" : "object", "properties" : { "type" : { "type" : "string", "deprecated" : false, "enum" : [ "subscription_cancellation", "create_credit_note", "refund_credit_note", "void_invoice", "order_resend" ], "example" : null }, "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "enabled", "disabled" ], "example" : null } }, "required" : [ "code", "id", "status", "type" ], "example" : null }, "RecordPurchaseFailedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "recorded_purchase" : { "$ref" : "#/components/schemas/RecordedPurchase" }, "customer" : { "$ref" : "#/components/schemas/Customer" } }, "required" : [ "customer", "recorded_purchase" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "RecordedPurchase" : { "type" : "object", "description" : "

Important

The recorded purchase resource represents a background job of syncing in-app purchases made through external storefronts like Apple and Google with Chargebee. The status (in_process, completed, and failed) attribute represents the current status of the background job.

Record Apple and Google In-App Purchases and Retrieve Associated Omni-Subscription and Transaction from Chargebee

You can record in-app subscription purchases made on the Apple App Store in Chargebee using the transaction[id] or using receipt and product[id] received after a successful purchase.

To record the purchase and retrieve subscription details, follow these steps:

    \n
  1. \n

    Use the Record a Purchase API to record a subscription purchase made in in Apple App Store or Google Play Store.

    \n\n
  2. \n
  3. \n

    The API response will include a recorded_purchase object containing the status of the purchase recording job.

    \n
  4. \n
  5. \n

    Once the purchase is successfully recorded, the status attribute of the recorded_purchase object updates from in_process to completed. At this point, Chargebee creates an omnichannel_subscription resource and triggers an omnichannel_subscription_created webhook event, which contains the omnichannel_subscription and omnichannel_transaction objects.

    \n
  6. \n
  7. \n

    In addition to using Webhooks (push-based), you can retrieve details for a recorded purchase by using the recorded purchase resource's ID, which is returned when you record the purchase.

    \n
  8. \n
", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique ID generated by Chargebee for the recorded purchase.\n", "maxLength" : 40, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the customer\nobject that is associated with this purchase. If the customer_id\nis not present in Chargebee when the record_a_purchase\nAPI request is made, Chargebee automatically creates the customer using the details provided in the request.

", "maxLength" : 100, "example" : null }, "app_id" : { "type" : "string", "deprecated" : false, "description" : "

App Identifier in Chargebee. This is the handle created by Chargebee for your app. To get the app_id:

\n", "maxLength" : 100, "example" : null }, "source" : { "type" : "string", "deprecated" : false, "description" : "The source where the purchase is originally made and managed.\n\\* google_play_store -\n\nWhen source of the application is Google Play Store\n\\* apple_app_store -\n\nWhen source of the application is Apple App Store\n", "enum" : [ "apple_app_store", "google_play_store" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Current status of the recorded purchase operation

\n* completed -

When the purchase recording job status is complete. You will receive the omnichannel_transaction_id\nand linked_omnichannel_subscriptions\nobject.

\n* ignored -

When the purchase recording job is initiated for an omnichannel subscription that already exists in Chargebee.

\n* failed -

When the purchase recording job is failed. In this state you will not\nreceive the omnichannel_transaction_id\nand linked_omnichannel_subscriptions\nobject. Check the error_detail\nattribute to understand the reason for failure.

\n* in_process -

When the purchase recording job is in progress. In this state you will not\nreceive the omnichannel_transaction_id\nand linked_omnichannel_subscriptions\nobject.

", "enum" : [ "in_process", "completed", "failed", "ignored" ], "example" : null }, "omnichannel_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the omni transaction\nobject associated with the purchase.

", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Indicates timestamp when the recorded_purchase\nresource is created in Chargebee.

", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource.

", "example" : null }, "linked_omnichannel_subscriptions" : { "type" : "array", "deprecated" : false, "description" : "The list of omni subscriptions created in response for this purchase. Applicable only for subscription purchases.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "omnichannel_subscription_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the omni subscription\nobject associated with this purchase.

", "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null }, "linked_omnichannel_one_time_orders" : { "type" : "array", "deprecated" : false, "description" : "The list of omnichannel one time orders created in response for this purchase. Applicable only for one time order purchases.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "omnichannel_one_time_order_id" : { "type" : "string", "deprecated" : false, "description" : "

The id\nof the omni one time order\nobject associated with this purchase.

", "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null }, "error_detail" : { "type" : "object", "deprecated" : false, "description" : "

Applicable only for recorded purchases where the job status is failed.\nIt provides more details about the failure.

", "properties" : { "error_message" : { "type" : "string", "deprecated" : false, "description" : "

A descriptive information about the error_detail\n.

", "maxLength" : 500, "example" : null } }, "example" : null } }, "required" : [ "app_id", "created_at", "customer_id", "id", "source", "status" ], "example" : null }, "ReferenceCount" : { "type" : "object", "description" : "This resource returns the number of items.\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "

The type\nof the item

\n* charge -

Charge

\n* plan -

Plan

\n* addon -

Addon

", "enum" : [ "plan", "addon", "charge", "plan_price", "addon_price" ], "example" : null }, "count" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Number of items.\n", "example" : null } }, "example" : null }, "ReferralSystem" : { "type" : "string", "deprecated" : false, "enum" : [ "referral_candy", "referral_saasquatch", "friendbuy" ], "example" : null }, "ReferrerRewardType" : { "type" : "string", "deprecated" : false, "enum" : [ "none", "referral_direct_reward", "custom_promotional_credit", "custom_revenue_percent_based" ], "example" : null }, "RefundInitiatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "card" : { "$ref" : "#/components/schemas/Card" } }, "required" : [ "card", "credit_note", "customer", "invoice", "subscription", "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "RefundableCreditsHandling" : { "type" : "string", "deprecated" : false, "enum" : [ "no_action", "schedule_refund" ], "example" : null }, "ReportBy" : { "type" : "string", "deprecated" : false, "enum" : [ "customer", "invoice", "product", "subscription" ], "example" : null }, "ResourceMigration" : { "type" : "object", "description" : "Resource Migration is used for finding the status of customer migration between Chargebee sites.\n", "properties" : { "from_site" : { "type" : "string", "deprecated" : false, "description" : "Domain name to which the item is moved.\n", "maxLength" : 50, "minLength" : 4, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Type of the entity this record is stored for\n\\* customer -\n\nEntity that represents a customer\n", "enum" : [ "customer" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "Handle of the customer in the current site.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "default" : "failed", "deprecated" : false, "description" : "Status of the copy customer process.\n\\* failed -\n\nFailed\n\\* succeeded -\n\nSucceeded\n\\* scheduled -\n\nScheduled\n", "enum" : [ "scheduled", "failed", "succeeded" ], "example" : null }, "errors" : { "type" : "string", "deprecated" : false, "description" : "Filled only if the copy operation gets failed\n", "maxLength" : 65000, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time the log is created\n", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time the log is updated\n", "example" : null } }, "required" : [ "created_at", "entity_id", "entity_type", "from_site", "status", "updated_at" ], "example" : null }, "ResponseDocumentType" : { "type" : "string", "deprecated" : false, "enum" : [ "application_response" ], "example" : null }, "ResponseStatus" : { "type" : "string", "deprecated" : false, "enum" : [ "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "ResumeOption" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "specific_date" ], "example" : null }, "RetryEngine" : { "type" : "string", "default" : "chargebee", "deprecated" : false, "enum" : [ "chargebee", "flexpay", "successplus" ], "example" : null }, "Role" : { "type" : "string", "deprecated" : false, "enum" : [ "primary", "backup", "none" ], "example" : null }, "Rule" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "namespace" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "rule_name" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "rule_order" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "active", "disabled" ], "example" : null }, "conditions" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "outcome" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "deleted" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "deleted", "id", "modified_at", "namespace", "rule_name", "status" ], "example" : null }, "RuleCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "rule" : { "$ref" : "#/components/schemas/Rule" } }, "required" : [ "rule" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "RuleDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "rule" : { "$ref" : "#/components/schemas/Rule" } }, "required" : [ "rule" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "RuleUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "rule" : { "$ref" : "#/components/schemas/Rule" } }, "required" : [ "rule" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Ruleset" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "maxLength" : 500, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "active" : { "type" : "boolean", "deprecated" : false, "example" : null }, "execute_mode" : { "type" : "string", "default" : "execute_all", "deprecated" : false, "enum" : [ "stop_on_first_true", "stop_on_first_false", "execute_all", "execute_all_true" ], "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "created_by" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "rules" : { "type" : "array", "deprecated" : false, "items" : { "example" : null }, "example" : null } }, "required" : [ "active", "created_at", "created_by", "execute_mode", "id", "name", "updated_at" ], "example" : null }, "RulesetRule" : { "type" : "object", "properties" : { "rule_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "priority" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null } }, "required" : [ "priority", "rule_id" ], "example" : null }, "SalesOrder" : { "type" : "object", "description" : "Sales orders represent the contractual agreement and commitment for services between a seller and a buyer. They act as a seamless interface connecting any sales system (such as CPQ, CRM, or Customer Portal) with Chargebee Billing. The sales order captures the following essential components\n\n* Order Line Items including discounts and ramps\n* Billing and payment configuration\n* Contract terms and conditions\n* Customer information including billing and shipping contacts\n* Meta data\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "External identifier of the sales order.\n", "maxLength" : 50, "example" : null }, "version" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Version of the sales order.\n", "example" : null }, "renewed_from_order_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the original sales order from which this order was renewed. This field is used to track renewal orders and link them to their previous sales transactions.\n", "maxLength" : 50, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the timestamp at which this sales order was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating sales order created.\n", "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Buyer's purchase order reference number.\n", "maxLength" : 100, "example" : null }, "meta_data" : { "type" : "string", "deprecated" : false, "description" : "A set of key-value pairs stored as additional information for the subscription. [Learn more](/docs/api/sales_orders)\n.\n", "maxLength" : 65000, "example" : null }, "quote_id" : { "type" : "string", "deprecated" : false, "description" : "Primary quote id for which the order was placed.\n", "maxLength" : 100, "example" : null }, "effective_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Effective start date of the order signifies when the contract is signed and becomes legally binding.\n", "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the order is considered completed, cancelled, or no longer valid.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the\n[business entity](/docs/api/getting-started)\nof this sales order.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the customer to which this sales order belongs.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the sales order.\n", "maxLength" : 3, "example" : null }, "subscription_ids" : { "type" : "array", "deprecated" : false, "description" : "The unique identifiers of the [subscriptions](/docs/api/subscriptions)\nthat are bundled as part of this sales order.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "status" : { "type" : "string", "default" : "active", "deprecated" : false, "description" : "Status of the sales order.\n\\* completed -\n\ncompleted\n\\* active -\n\nactive\n", "enum" : [ "active", "completed" ], "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "example" : null }, "line_items" : { "type" : "array", "deprecated" : false, "description" : "Line items of this sales order\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "External identifier of the sales order line item.\n", "maxLength" : 50, "example" : null }, "association_id" : { "type" : "string", "deprecated" : false, "description" : "A reference of line item to associate with other entities like line item tiers.\n", "maxLength" : 105, "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "ID of the item price.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "Name of the item.\n", "maxLength" : 100, "example" : null }, "quantity" : { "type" : "string", "default" : "1", "deprecated" : false, "description" : "Quantity of the item.\n", "maxLength" : 39, "example" : null }, "unit_price" : { "type" : "string", "deprecated" : false, "description" : "Unit price of the item.\n", "maxLength" : 39, "example" : null }, "billable_unit_price" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "billable_quantity" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "billable_amount" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "billing_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Defines billing period for the subscription item\n", "minimum" : 1, "example" : null }, "billing_period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines billing period unit in association with the billing period.\n\\* week -\n\nA period of 7 days.\n\\* year -\n\nA period of 1 calendar year.\n\\* day -\n\nA period of 24 hours.\n\\* month -\n\nA period of 1 calendar month.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "service_period_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The service period of the item in days from the day of charge.\n", "maximum" : 730, "minimum" : 1, "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles for which this line item remains valid.\n", "minimum" : 0, "example" : null }, "billing_type" : { "type" : "string", "deprecated" : false, "description" : "Billing type of the item.\n\\* one_time -\n\nItem gets billed once\n\\* event_based -\n\nItem gets billed on specific events\n\\* recurring -\n\nItem gets billed at regular intervals\n", "enum" : [ "recurring", "one_time", "event_based" ], "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of the line item.\n", "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of the line item.\n", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time when the trial period of the item ends.\n", "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "day", "week", "month", "year" ], "example" : null } }, "required" : [ "billing_type", "id", "item_price_id", "quantity", "start_date", "unit_price" ], "example" : null }, "example" : null }, "billing_addresses" : { "type" : "array", "deprecated" : false, "description" : "Billing address for a customer.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "State or Province\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n\\* valid -\n\nAddress was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "List of discounts for this subscription\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An immutable code for the discount. It is always auto-generated.\n", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the discount as it should appear on customer-facing pages and documents such as invoices\nand hosted pages.\nThis is auto-generated based on the type\n, amount\n, and currency_code\nof the discount. For example, it can be 10% off\nor 10$ off\n.

", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "The type of discount.\nPossible value are:\n\\* fixed_amount -\n\nThe specified amount will be given as discount.\n\\* percentage -\n\nThe specified percentage will be given as discount.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* 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\nand period_unit\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "

The percentage of the original amount that should be deducted from it. Only applicable when discount.type\nis percentage.

\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "description" : "

The value of the discount. The format of this value\ndepends on the kind of currency. This is only applicable when discount.type\nis fixed_amount.

\n", "maxLength" : 39, "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "ID/code of the coupon to be applied.\n", "maxLength" : 50, "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* month -

A period of 1 calendar month.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "maxLength" : 100, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of the discount.\n", "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of the discount.\n", "example" : null } }, "required" : [ "apply_on", "duration_type", "id", "start_date", "type" ], "example" : null }, "example" : null }, "shipping_addresses" : { "type" : "array", "deprecated" : false, "description" : "Shipping address for the subscription.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* valid -\n\nAddress was validated successfully.\n\\* invalid -\n\nAddress is invalid.\n\\* not_validated -\n\nAddress is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "example" : null }, "line_item_tiers" : { "type" : "array", "deprecated" : false, "description" : "

The pricing details of line_items\nwhich have pricing_model\nas tiered\n, volume\nor stairstep.\nLearn more\nabout pricing models.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "starting_unit" : { "type" : "string", "deprecated" : false, "description" : "The lowest value in the quantity tier.\n", "maxLength" : 39, "example" : null }, "ending_unit" : { "type" : "string", "deprecated" : false, "description" : "The highest value in the quantity tier.\n", "maxLength" : 39, "example" : null }, "price" : { "type" : "string", "deprecated" : false, "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "maxLength" : 39, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null }, "line_item_association_id" : { "type" : "string", "deprecated" : false, "description" : "Association id of line item tho whom this line item tiers belongs.\n", "maxLength" : 105, "example" : null } }, "required" : [ "price", "starting_unit" ], "example" : null }, "example" : null }, "payment_configuration" : { "type" : "object", "deprecated" : false, "description" : "Payment configuration of this sales order\n", "properties" : { "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Auto collection status.\n\\* off -\n\noff\n\\* on -\n\non\n", "enum" : [ "on", "off" ], "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the payment source for which this transaction is made\n", "maxLength" : 50, "example" : null }, "payment_intent_id" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 150, "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the sales order.\n\\* cash -\n\nCash\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* no_preference -\n\nNo Preference\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* check -\n\nCheck\n\\* custom -\n\nCustom\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n\\* sepa_credit -\n\nSEPA Credit\n\\* bank_transfer -\n\nBank Transfer\n\\* boleto -\n\nBoleto\n", "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" ], "example" : null } }, "example" : null }, "billing_configuration" : { "type" : "object", "deprecated" : false, "description" : "Configurations controlling billing behavior and invoice generation workflows.\n", "properties" : { "create_pending_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if pending invoices should be created.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether the invoices for this order are generated with a pending status.This attribute is set to true automatically when the subscription has item prices that belong to metered items.\n", "example" : null }, "first_invoice_pending" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates if you want to bill the usages from the previous billing cycle. This creates a pending invoice immediately on subscription creation.\n", "example" : null }, "invoice_usages" : { "type" : "boolean", "deprecated" : false, "description" : "

Setting this attribute to true would invoice the overages for the metered item during subscription changes

", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Net terms in days.\n", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\n", "example" : null }, "next_renewal_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "billing_cycles_to_invoice" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles to be invoiced in advance for this order. If not specified, the invoice will be generated for the first billing cycle by default.\n", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the billing alignment mode for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\\* delayed -\n\nSubscription period will be aligned with the configured billing date at the next renewal.\n\\* immediate -\n\nSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n", "enum" : [ "immediate", "delayed" ], "example" : null } }, "example" : null }, "renewal_term" : { "type" : "object", "deprecated" : false, "description" : "Renewal term for this sales order.\n", "properties" : { "end_of_term_action" : { "type" : "string", "deprecated" : false, "description" : "

The action at end of contract term

\n* cancel -

Contract term completes and subscription is canceled.

\n* renew - \n* evergreen -

Contract term completes and the subscription renews.

", "enum" : [ "renew", "cancel", "evergreen" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before 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.\n", "example" : null }, "renewal_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Specifies the number of billing cycles for which the contract will be renewed.\n", "example" : null } }, "required" : [ "end_of_term_action" ], "example" : null }, "credit_lines" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "amount" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "unit_price" : { "type" : "string", "default" : "0.00", "deprecated" : false, "maxLength" : 39, "example" : null }, "quantity" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "line_item_association_id" : { "type" : "string", "deprecated" : false, "maxLength" : 105, "example" : null } }, "required" : [ "amount", "unit_price" ], "example" : null }, "example" : null }, "entitlement_overrides" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "item_price", "subscription" ], "example" : null }, "value" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "is_enabled" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "entity_id", "entity_type", "feature_id", "id", "is_enabled", "start_date" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "currency_code", "customer_id", "deleted", "effective_date", "id", "status", "subscription_id", "version" ], "example" : null }, "SalesOrderCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "sales_order" : { "$ref" : "#/components/schemas/SalesOrder" } }, "required" : [ "sales_order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SalesOrderUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "sales_order" : { "$ref" : "#/components/schemas/SalesOrder" } }, "required" : [ "sales_order" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "ScheduleType" : { "type" : "string", "deprecated" : false, "enum" : [ "immediate", "specific_dates", "fixed_intervals" ], "example" : null }, "Site" : { "type" : "object", "description" : "

Represents a platform site in Chargebee.\nEach platform site includes a unique id, the associated site_id, and a domain, along with its site_type and created_at timestamp.

", "properties" : { "site_owner_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the platform site. Maximum length is 40 characters.\n", "maxLength" : 60, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "active", "disabled", "cancelled" ], "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "sandbox", "live" ], "example" : null }, "domain" : { "type" : "string", "deprecated" : false, "description" : "Domain name of the platform site. Maximum length is 50 characters.\n", "maxLength" : 50, "minLength" : 4, "example" : null }, "locale" : { "type" : "string", "default" : "en", "deprecated" : false, "description" : "null\n", "enum" : [ "en", "fr", "de", "it", "pt", "es", "da", "tr", "fi", "sl", "zh", "sv", "ja", "ru", "nl", "lt", "lv", "et", "pl", "id", "cs", "sk", "ko", "no", "ro", "th", "vi", "bg", "hu", "uk", "hr" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this platform site was created.\n", "example" : null }, "timezone" : { "type" : "string", "default" : "UTC", "deprecated" : false, "maxLength" : 50, "example" : null }, "created_from_ip" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "linked_sites" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 60, "example" : null }, "domain" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "minLength" : 4, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "sandbox", "live" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "active", "disabled", "cancelled" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "domain" ], "example" : null }, "example" : null } }, "required" : [ "created_at", "domain" ], "example" : null }, "SiteMigrationDetail" : { "type" : "object", "description" : "Site Migration details is used for finding the records that are moved in and moved out from one Chargebee site to another.\n", "properties" : { "entity_id" : { "type" : "string", "deprecated" : false, "description" : "Id of the entity in this site.\n", "maxLength" : 100, "example" : null }, "other_site_name" : { "type" : "string", "deprecated" : false, "description" : "Site name to which the record is moved in/out.\n", "maxLength" : 50, "minLength" : 4, "example" : null }, "entity_id_at_other_site" : { "type" : "string", "deprecated" : false, "description" : "Entity Id of the record in the other site.\n", "maxLength" : 100, "example" : null }, "migrated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date in which the record is copied\n", "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Entity Type of the record\n\\* order -\n\nEntity that represents an order\n\\* customer -\n\nEntity that represents a customer\n\\* invoice -\n\nInvoice description\n\\* subscription -\n\nEntity that represents a subscription of a customer\n\\* transaction -\n\nEntity that represents a transaction.\n\\* credit_note -\n\nCredit note description\n", "enum" : [ "customer", "subscription", "invoice", "credit_note", "transaction", "order" ], "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Status of the migration\n\\* moving_out -\n\nMoving out from one cb site to another\n\\* moved_in -\n\nMoved in from another cb site\n\\* moved_out -\n\nMoved out from one cb site to another\n", "enum" : [ "moved_in", "moved_out", "moving_out" ], "example" : null } }, "required" : [ "entity_id", "entity_id_at_other_site", "entity_type", "migrated_at", "other_site_name", "status" ], "example" : null }, "SiteOwner" : { "type" : "object", "description" : "

Represents a site owner in Chargebee.\nEach site owner includes a unique id and required email, and can optionally include name, customer_id, and updated_at.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the site owner. Maximum length is 40 characters. This field is required.\n", "maxLength" : 40, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address of the site owner in valid email format. Maximum length is 70 characters. This field is required.\n", "maxLength" : 70, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "Name of the site owner. Maximum length is 50 characters.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "ID of the associated customer. Maximum length is 50 characters.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Unix timestamp when this site owner was last updated.\n", "example" : null } }, "required" : [ "created_at", "email", "id" ], "example" : null }, "SitePcMetaRecord" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "event" : { "type" : "string", "deprecated" : false, "enum" : [ "site_upgrade", "site_downgrade" ], "example" : null }, "pc_type" : { "type" : "string", "deprecated" : false, "enum" : [ "pc1", "pc2" ], "example" : null }, "occurred_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "event", "id", "occurred_at", "pc_type" ], "example" : null }, "Source" : { "type" : "string", "deprecated" : false, "enum" : [ "admin_console", "api", "bulk_operation", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "external_service" ], "example" : null }, "Status" : { "type" : "string", "deprecated" : false, "enum" : [ "active", "archived", "deleted", "available", "exhausted", "scheduled", "in_grace_period" ], "example" : null }, "Subscription" : { "type" : "object", "additionalProperties" : true, "description" : "

A Chargebee subscription connects a customer record to products/services. It describes what the customer has signed up for and how often they're charged for it. The essential components of a subscription are:

The charges in a subscription are billed via invoices.

Note:\nThe maximum number of subscriptions for any given customer\n(active\nor not) is 900.

Subscription billing frequencies

Chargebee offers two billing frequency options for subscriptions:

    \n
  • \n

    Plan-based billing (default): Subscriptions are billed based on the billing period defined for the item price of the item_type plan. Learn more.

    \n
  • \n
  • \n

    Multi-frequency billing: Subscriptions are billed according to the billing period of each recurring item price within the subscription. Learn more.

    \n

    Important

    Limitations of Multi-frequency billing.

    \n

    Private Beta

    Multi-frequency billing is in private beta. Please reach out to the Chargebee support to enable this feature.

    \n
  • \n

The selection of the billing frequency preference is configured at the site level.

Item price compatibility in a subscription

When creating or updating a subscription, one of the item prices specified under subscription_items must be a plan-item price. The remaining must be compatible addon- or charge-item prices. An item price is compatible with a plan-item price if their currencies are the same. Additionally, an addon-item price is compatible with a plan-item price only if their billing frequencies meet the following conditions:

period_unit for plan-item priceCompatible period_unit for addon-item priceCompatible period for addon-item price
dayday

The period of the plan-item price should be divisible by the period of the addon-item price.

Example

If the period of the plan-item price is 10, then the period of the addon-item price can be 10, 5, 2, or 1.

weekweek or day

The period (in days) of the plan-item price should be divisible by the period of the addon-item price.

Example\nIf the period of the plan-item price is 2, then the period of the addon-item price can be as follows depending on the value of period_unit:

    \n
  • for period_unit as week, period can be 2 or 1.
  • \n
  • for period_unit as day, period can be 14, 7, 2, or 1.
  • \n
monthmonth

The period of the plan-item price should be divisible by the period of the addon-item price.

Example

If the period of the plan-item price is 6, then the period of the addon-item price can be 6, 3, 2, or 1.

yearyear or month

The period (in months) of the plan-item price should be divisible by the period of the addon-item price.

Example

If the period of the plan-item price is 2, then the period of the addon-item price can be as follows depending on the value of period_unit:

    \n
  • for period_unit as year, period can be 2 or 1.
  • \n
  • for period_unit as month, period can be 24, 12, 8, 6, 4, 3, 2, or 1.
  • \n

Tax provider fields

Avalara: Merchants using Avalara Sales Tax can optionally associate each item price with a locationCode (from their Avalara company locations), so tax can be resolved correctly at the line item level.

Field IDField ValueAPIs
locationCodeMerchant to configure it on Avalara Platform under company locationsAPIs having Item Prices attributes.

Anrok: Canadian customers can have multiple tax registration numbers. We currently support only sharing one tax registration number with Anrok. So we added a new field which can have comma separated multiple tax reg numbers for Anrok. Values configured in the field is passed as it is to Anrok for accurate tax calculation

Field IDField ValueAPIs
additionalTaxRegistrationNumberCanadian tax registration numbers in comma separated fashion.APIs involving customer attributes. Also includes APIs where we are creating new customers. Eg: estimate, subscription, hosted pages.

Vertex: Chargebee shares field IDs and corresponding values with merchants, who then configure them on the Vertex Platform for seamless integration

Note:\nField Id like customerCode\n, customerClass\n, andtaxExempted\nbelong to the customer object.

Field Id like productCode\n, productClass\n, productTaxCode\n, and productClass\nbelong to the product object.

Field IDField ValueAPIs
productCodeMerchant to configure it on Vertex PlatformAPIs having Item Prices attributes.
productClass
customerCodeAPIs involving customer attributes. Also includes APIs where we are creating new customers. For example: estimate, subscription, hosted pages.
customerClass

Taxamo: Chargebee shares field IDs and corresponding values with merchants, who then configure them on the Taxamo Platform for seamless integration

Field IdField ValueAPIs
productTaxCodeMerchant to configure it on Taxamo PlatformAPIs having Item Prices attributes.
productClass
taxExemptedAPIs involving customer attributes. Also includes APIs where we are creating new customers. For example: estimate, subscription, hosted pages.

cbtaxes: With CBTaxes, you can activate India IGST for customers located in Special Economic Zones (SEZ), implement zero-rated tax for SEZ customers, enable India IGST for customers outside of India, and set up zero-rated tax for customers outside of India.

Field IDField ValueAPIs
indiaSezSEZ_IGST_TAXAPIs involving customer attributes. Also includes APIs where we are creating new customers. For example: estimate, subscription, hosted pages.
SEZ_ZERO_RATED_TAX
indiaExportEXPORT_IGST_TAX
EXPORT_ZERO_RATED_TAX

All: For tax inclusive tax calculation, For tax exclusive tax calculation. This is currently used for price type overriding at customer level

Field IDField ValueAPIs
priceTypeTAX_INCLUSIVEAPIs involving customer attributes. Also includes APIs where we are creating new customers. For example: estimate, subscription, hosted pages.
TAX_EXCLUSIVE
SITE_DEFAULT or blankRemoves price type override, and allows site level configuration to be used for tax calculation.

Ramps API compatibility mode

If you want to schedule changes on a subscription, use the Ramps API.

If you are currently scheduling changes through the Update subscription API, migrate to the Ramps API. To get started, request access for Subscription Ramps. Chargebee will enable Ramps compatibility mode for your site. Once enabled, you can test the Ramps API without impacting your existing integrations.

The following parts of the Billing API have subtle differences in behavior when the Ramps feature is disabled versus when it is enabled with compatibility mode. (Follow the links to learn more.)

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

The unique identifier of the subscription\nresource. You have the option to specify this value when creating a customer. If not specified, Chargebee automatically generates a unique identifier.

\n

Note\nIn the event that the subscription resource is transferred along with its associated customer resource to a different business entity, Chargebee assigns a new random value as the id for the subscription. The original identifier is preserved for the transferred copy of the subscription resource. (See also: Mechanics of business entity transfer.)

\n", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) of the subscription\n", "maxLength" : 3, "example" : null }, "billing_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the length of each billing cycle (or term) of the subscription, expressed in the unit defined by billing_period_unit.

", "minimum" : 1, "example" : null }, "billing_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the unit used to measure the billing_period.

\n* day -

Charge based on day(s)

\n* month -

Charge based on month(s)

\n* year -

Charge based on year(s)

\n* week -

Charge based on week(s)

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Applicable only for 'future' subscriptions. The scheduled start time of the subscription.\n", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End of the trial period for the subscription. Presence of this value for 'future' subscription implies the subscription will go into 'in_trial' state when it starts.\n", "example" : null }, "remaining_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : 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.\n* When the subscription is on a [contract term](/docs/api/contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle.\n", "minimum" : 0, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\\* on -\n\nWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n\\* off -\n\nAutomatic collection of charges will not be made for this subscription. Use this for offline payments.\n", "enum" : [ "on", "off" ], "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Returned for quantity-based plans when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this subscription is associated.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

Current state of the subscription

\n* future -

The subscription is scheduled to start at a future date.

\n* non_renewing -

The subscription will be canceled at the end of the current term.

\n* active -

The subscription is active and will be charged for automatically based on the items in it.

\n* cancelled -

The subscription has been canceled and is no longer in service.

\n* transferred -

The transferred\nstatus will be reflected on the source business entity's subscription attribute once the customer transfer\nactivity is completed successfully.

\n* in_trial -

The subscription is in trial.

\n* paused -

The subscription is paused.\nThe subscription will not renew while in this state.

", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "trial_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Start of the trial period for the subscription. Presence of this value for future\nsubscription implies the subscription will go into in_trial\nstate when it starts.

", "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "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)\nhas 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.\n\\* activate_subscription -\n\nThe subscription activates and charges are raised for non-metered items.\n\\* cancel_subscription -\n\nThe subscription cancels.\n\\* plan_default -\n\nThe action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n\\* site_default -\n\nThis is the default value. The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nat the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "current_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start of the current billing period of the subscription.\n", "example" : null }, "current_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End of the current billing period of the subscription. Subscription is renewed immediately after this.\n", "example" : null }, "next_billing_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date/time at which the next billing for the subscription happens. This is usually right after current_term_end\nunless multiple subscription terms were invoiced in advance using the terms_to_charge\nparameter.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the subscription was created.\n", "example" : null }, "started_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Time at which the subscription was started. Is null\nfor future\nsubscriptions as it is yet to be started.

", "example" : null }, "activated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Time at which the subscription status\nlast changed to\nactive.\nFor example, this value is updated when an in_trial\nor\ncancelled\nsubscription activates.

", "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles\nor a custom value depending on the site configuration\n.

", "maximum" : 100, "minimum" : 1, "example" : null }, "override_relationship" : { "type" : "boolean", "deprecated" : false, "description" : "

If true\n, ignores the hierarchy relationship\nand uses customer as payment and invoice owner.

", "example" : null }, "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

When a pause has been scheduled, it is the date/time of scheduled pause. When the subscription is in the paused\nstate, it is the date/time when the subscription was paused.

", "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time at which subscription was cancelled or is set to be cancelled.\n", "example" : null }, "cancel_reason" : { "type" : "string", "deprecated" : false, "description" : "The reason for canceling the subscription. Set by Chargebee automatically.\n\\* no_card -\n\nNo Card\n\\* non_compliant_customer -\n\nNon Compliant Customer\n\\* currency_incompatible_with_gateway -\n\nCurrency incompatible with Gateway\n\\* fraud_review_failed -\n\nFraud Review Failed\n\\* tax_calculation_failed -\n\nTax Calculation Failed\n\\* not_paid -\n\nNot Paid\n\\* non_compliant_eu_customer -\n\nNon Compliant EU Customer\n", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "created_from_ip" : { "type" : "string", "deprecated" : false, "description" : "The IP address of the user. Used primarly in Refersion integration. Refersion uses this field to track/log affiliate subscription.\n", "maxLength" : 50, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the item was last updated.\n", "example" : null }, "has_scheduled_advance_invoices" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "The subscription has an [advance invoicing schedule](/docs/api/advance_invoice_schedules)\n.\n", "example" : null }, "has_scheduled_changes" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether a change is scheduled on the subscription. \n**Note**\nWhen [Ramps](ramps) are enabled with compatibility mode, this attribute indicates whether one or more ramps are scheduled for the subscription. For more details, see [Ramps API compatibility mode](/docs/api/subscriptions#ramps-compat-mode).\n", "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source attached to this subscription. If present, customer's payment sources won't be used to collect any payment for this subscripiton.\n", "maxLength" : 40, "example" : null }, "plan_free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The free_quantity_in_decimal as set for the plan. Returned for quantity-based plans when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the total amount for the plan, in major units of the currency. Always returned when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "cancel_schedule_created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

This is the date/time at which the most recent cancellation schedule for the subscription was created in Chargebee. Applicable only for cancelled\nsubscriptions or subscriptions that are scheduled for cancellation.

", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\\* sepa_credit -\n\nSEPA Credit\n\\* cash -\n\nCash\n\\* no_preference -\n\nNo Preference\n\\* bank_transfer -\n\nBank Transfer\n\\* check -\n\nCheck\n\\* eu_automated_bank_transfer -\n\nEU Automated Bank Transfer\n\\* jp_automated_bank_transfer -\n\nJP Automated Bank Transfer\n\\* uk_automated_bank_transfer -\n\nUK Automated Bank Transfer\n\\* custom -\n\nCustom\n\\* boleto -\n\nBoleto\n\\* mx_automated_bank_transfer -\n\nMX Automated Bank Transfer\n\\* us_automated_bank_transfer -\n\nUS Automated Bank Transfer\n\\* ach_credit -\n\nACH Credit\n", "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" ], "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The Net D\nvalue explicitly set for this subscription. Net D is the number of days from invoice.date until payment for the invoice is due. When an invoice is raised, and this value is unavailable, the net_term_days defined at the customer level\nis considered.

", "example" : null }, "active_id" : { "type" : "string", "deprecated" : false, "description" : "

Note: Present only when the subscription has been transferred between business entities.

\n

Represents the id of the active version of the subscription resource.

\n

Tip\nIf the id and active_id of a subscription resource are the same, this indicates that you are working with the active version of that subscription resource.

\n", "maxLength" : 50, "example" : null }, "due_invoices_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Total number of invoices that are due for payment against the subscription.\nNote:\nNot supported if consolidated invoicing\nis enabled, or when the subscription is for the customer who is in hierarchy\n, and the parent of this customer owns and pays for the invoices of the subscription. It is also worth noting that the consolidated invoice amount is not included in the calculation of due_invoices_count\n.

", "example" : null }, "due_since" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time since this subscription has unpaid invoices.\n**Note:**\nNot supported if [consolidated invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html)\nis enabled, or when the subscription is for the customer who is in [hierarchy](/docs/api/hierarchies)\n, and the parent of this customer owns and pays for the invoices of the subscription.\n", "example" : null }, "total_dues" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Total invoice due amount for this subscription. The value depends on the type of currency\n.\nNote:\nNot supported if consolidated invoicing\nis enabled, or when the subscription is for the customer who is in hierarchy\n, and the parent of this customer owns and pays for the invoices of the subscription. It is also worth noting that the consolidated invoice amount is not included in the calculation of total_dues\n.

", "minimum" : 0, "example" : null }, "mrr" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Monthly recurring revenue for the subscription. Updated asynchronously, this value catches up with changes to the subscription in less than a minute. The value depends on the [type of currency](/docs/api/currencies)\n.\n**Note:**\nThis may not return accurate values since updated asynchronously.\n", "minimum" : 1, "example" : null }, "exchange_rate" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Exchange rate used for base currency conversion.This value is updated to the [rate configured](https://www.chargebee.com/docs/multi-currency-pricing.html#configuring-multicurrency)\non your site each time any change is made to the subscription.\n", "maximum" : 1000000000, "minimum" : 0.0000000010, "example" : null }, "base_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) of the site's base currency.\n", "maxLength" : 3, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "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-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates that the subscription has been deleted when the value is true.\nYou can retrieve a deleted subscription using the list operation\n.

", "example" : null }, "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date-time at which the subscription change is scheduled to happen. \n**Note**\nThis attribute is not returned when the change is scheduled to happen at the end of the current term.\n", "example" : null }, "cancel_reason_code" : { "type" : "string", "deprecated" : false, "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**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive\n", "maxLength" : 100, "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The period of time by which the first term of the subscription is extended free of charge. The value is expressed in the time unit specified by free_period_unit. For example, 3 with free_period_unit = month means 3 free months are added to the first term.

", "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The time unit for free_period.

\n* week -

Charge based on week(s)

\n* month -

Charge based on month(s)

\n* day -

Charge based on day(s)

\n* year -

Charge based on year(s)

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "create_pending_invoices" : { "type" : "boolean", "deprecated" : false, "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.\nYou can also set this to true explicitly using the create/update subscription operations. This is useful in the following scenarios:

\n", "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "

Set to false\nto override for this subscription, the site-level setting\nfor 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\n.

", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the [business entity](/docs/api/advanced-features)\nof this subscription. This is always the same as the [business entity](/docs/api/subscriptions/subscription-object#customer_id)\nof the customer.\n", "maxLength" : 50, "example" : null }, "decommissioned" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Indicates whether the subscription should be decommissioned when it is canceled. If set to true all subscription operations will be disabled except deletion.

\n

Note: Decommission operation is irreversible. Once set to true it cannot be updated to false and thus subscription will remain decommissioned permanently.

", "example" : null }, "subscription_items" : { "type" : "array", "deprecated" : false, "description" : "Details of individual [item prices](/docs/api/item_prices)\nthat are part of this subscription.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the item price.\n", "maxLength" : 100, "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "

The type of item. There must be one and only one item of type plan\nin this list.

\n* plan -

Plan

\n* charge -

Charge

\n* addon -

Addon

", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The quantity of the item purchased\n", "minimum" : 1, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price/per unit price of the item. When not provided, the value set\nfor the item price is used. This is only applicable when the pricing_model\nof the item price is flat_fee\nor per_unit.\nAlso, it is only allowed when price overriding\nis enabled for the site. The value depends on the type of currency. If changes_scheduled_at\nis in the past and a unit_price\nis 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.

", "minimum" : 0, "example" : null }, "unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 39, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The total amount for the item as determined from unit_price\n, free_quantity\n, quantity\nand item_tiers\nas applicable. The value depends on the type of currency\n.

", "minimum" : 0, "example" : null }, "current_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The beginning of the item's current billing period. \n**Note**\nApplicable only when multi-frequency billing is enabled. \n**Private Beta**\nMulti-frequency billing is in private beta. Please reach out to the Chargebee [support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "example" : null }, "current_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end of the item's current billing period. Chargebee renews the item immediately following this date. \n**Note**\nApplicable only when multi-frequency billing is enabled. \n**Private Beta**\nMulti-frequency billing is in private beta. Please reach out to the Chargebee [support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "example" : null }, "next_billing_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date or time at when the next billing for the item is scheduled to occur. This typically occurs immediately after current_term_end.

\n

Note\nApplicable only when multi-frequency billing is enabled.

\n

Private Beta\nMulti-frequency billing is in private beta. Please reach out to the Chargebee support to enable this feature.

", "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the total amount for the item, in major units of the currency. Always returned when [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "billing_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the length of each billing cycle for this subscription item, expressed in the unit defined by subscription_items.billing_period_unit.

\n

Returned only if

\nMulti-Frequency Billing is enabled.

", "minimum" : 1, "example" : null }, "billing_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

Specifies the unit used to measure the subscription_items.billing_period.

\n

Returned only if

\nMulti-Frequency Billing is enabled.

\n* year -

A period of 1 calendar year.

\n* week -

A period of 7 days.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The free_quantity\nof the plan-item as specified\nfor the item price.

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The free_quantity_in_decimal\nas set for the item price. Returned for quantity-based item prices when multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "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)\n--addon-items as well.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "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](/docs/api/item_prices/item-price-object)\nfor 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)\nare 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](/docs/api/attached_items/attached-item-object)\nis used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object)\nis used.\n", "minimum" : 0, "example" : null }, "service_period_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The service period of the item in days from the day of charge.\n", "maximum" : 730, "minimum" : 1, "example" : null }, "charge_on_event" : { "type" : "string", "deprecated" : false, "description" : "

When charge_on_option\noption is set to on_event\n, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.

\n* contract_termination -

when a contract term is terminated\n.

\n* subscription_trial_start -

the time when the trial period of the subscription begins.

\n* subscription_activation -

the moment a subscription enters an active\nor non-renewing\nstate. Also includes reactivations of canceled subscriptions.

\n* plan_activation -

same as subscription activation, but also includes the case when the plan-item of the subscription is changed.

\n* subscription_creation -

the time of creation of the subscription.

", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "charge_once" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates if the charge-item is to be charged only once or each time the charge_on_event\noccurs. This parameter only applies to charge-items.

", "example" : null }, "charge_on_option" : { "type" : "string", "deprecated" : false, "description" : "

Indicates when the charge-item is to be charged. This parameter only applies to charge-items.

\n* immediately -

The item is charged immediately on being added to the subscription.

\n* on_event -

The item is charged at the occurrence of the event specified as charge_on_event\n.

", "enum" : [ "immediately", "on_event" ], "example" : null }, "proration_type" : { "type" : "string", "deprecated" : false, "description" : "

Specifies how to manage charges or credits for the addon during a subscription update.

\n

You can't modify this parameter's value within the current term. Moreover, it is removed from the subscription attributes when the next term starts.

\n

See also:\nsubscription_items[proration_type]\nparameter for Update a subscription API\n.

\n\n* none -

Don't apply any charges or credits for the addon.

\n* full_term -

Charge the full price of the addon or give the full credit. Don't apply any proration.

\n* partial_term -

Prorate the charges or credits from the time of the change till the end of the current term.

", "enum" : [ "full_term", "partial_term", "none" ], "example" : null }, "usage_accumulation_reset_frequency" : { "type" : "string", "deprecated" : false, "description" : "Specifies the frequency at which the usage counter needs to be reset.\n\\* subscription_billing_frequency -\n\nAccumulates usage until the subscription's billing frequency ends.\n\\* never -\n\nAccumulates usage without ever resetting it.\n", "enum" : [ "never", "subscription_billing_frequency" ], "example" : null } }, "required" : [ "item_price_id", "item_type" ], "example" : null }, "example" : null }, "item_tiers" : { "type" : "array", "deprecated" : false, "description" : "

The pricing details of subscription_items\nwhich have pricing_model\nas\ntiered\n, volume\nor stairstep\n.

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item price to which this tier belongs.\n", "maxLength" : 100, "example" : null }, "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lowest value in the quantity tier.\n", "minimum" : 1, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The highest value in the quantity tier.\n", "example" : null }, "price" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nThe total cost for the item price when the pricing_model\nis stairstep.\nThe value is in the minor unit of the currency.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the pricing_model is tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null }, "index" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The index number of the subscription to which the item price is added. Provide a unique number between 0\nand 4\n(inclusive) for each subscription that is to be created.

", "minimum" : 0, "example" : null } }, "required" : [ "index", "item_price_id", "price", "starting_unit" ], "example" : null }, "example" : null }, "charged_items" : { "type" : "array", "deprecated" : false, "description" : "List of event based charge items that have already been charged.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "A unique ID for your system to identify the item price.\n", "maxLength" : 100, "example" : null }, "last_charged_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this charge item_price was last charged for this subscription.\n", "example" : null } }, "required" : [ "item_price_id", "last_charged_at" ], "example" : null }, "example" : null }, "coupons" : { "type" : "array", "deprecated" : false, "description" : "List of coupons for this subscription\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "Used to uniquely identify the coupon\n", "maxLength" : 100, "example" : null }, "apply_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The date till when the coupon can be applied. Applicable for limited_period\ncoupons\nonly.

", "example" : null }, "applied_count" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "Number of times this coupon has been applied for this subscription\n", "example" : null }, "coupon_code" : { "type" : "string", "deprecated" : false, "description" : "The coupon code used to redeem the coupon. Will be present only when associated code for a coupon is used.\n", "maxLength" : 50, "example" : null } }, "required" : [ "applied_count", "coupon_id" ], "example" : null }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Shipping address for the subscription.\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "

The ISO 3166-2 state/province code\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set state_code\nas AZ\n(not US-AZ\n). For Tamil Nadu (India), set as TN\n(not IN-TN\n). For British Columbia (Canada), set as BC\n(not CA-BC\n). For Dubai (UAE), set as DU\n(not AE-DU\n).

", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "

The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code\n.

\n

Note:\nIf you enter an invalid country code, the system will return an error.

\n

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.

", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\\* not_validated -\n\nAddress is not yet validated.\n\\* valid -\n\nAddress was validated successfully.\n\\* partially_valid -\n\nThe address is valid for taxability but has not been validated for shipping.\n\\* invalid -\n\nAddress is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "referral_info" : { "type" : "object", "deprecated" : false, "description" : "Referral details if exists for the subscription\n", "properties" : { "referral_code" : { "type" : "string", "deprecated" : false, "description" : "Referral code if available for the subscription\n", "maxLength" : 50, "example" : null }, "coupon_code" : { "type" : "string", "deprecated" : false, "description" : "Referral coupon code if available for the subscription\n", "maxLength" : 50, "example" : null }, "referrer_id" : { "type" : "string", "deprecated" : false, "description" : "Referrer id if available for the subscription\n", "maxLength" : 19, "example" : null }, "external_reference_id" : { "type" : "string", "deprecated" : false, "description" : "External reference id in referral system for the subscription\n", "maxLength" : 50, "example" : null }, "reward_status" : { "type" : "string", "default" : "pending", "deprecated" : false, "description" : "Reward status for the referral subscription\n\\* paid -\n\nPaid\n\\* invalid -\n\nInvalid\n\\* pending -\n\nPending\n", "enum" : [ "pending", "paid", "invalid" ], "example" : null }, "referral_system" : { "type" : "string", "deprecated" : false, "description" : "Source referral system for the referral subscription\n\\* referral_saasquatch -\n\nReferral Saasquatch\n\\* referral_candy -\n\nReferral Candy\n\\* friendbuy -\n\nFriendbuy\n", "enum" : [ "referral_candy", "referral_saasquatch", "friendbuy" ], "example" : null }, "account_id" : { "type" : "string", "deprecated" : false, "description" : "Referral account id\n", "maxLength" : 50, "example" : null }, "campaign_id" : { "type" : "string", "deprecated" : false, "description" : "Referral campaign id\n", "maxLength" : 50, "example" : null }, "external_campaign_id" : { "type" : "string", "deprecated" : false, "description" : "Referral external campaign id\n", "maxLength" : 100, "example" : null }, "friend_offer_type" : { "type" : "string", "deprecated" : false, "description" : "Friend offer type for the referral camapign\n\\* none -\n\nNone\n\\* coupon_code -\n\nCoupon Code\n\\* coupon -\n\nCoupon\n", "enum" : [ "none", "coupon", "coupon_code" ], "example" : null }, "referrer_reward_type" : { "type" : "string", "deprecated" : false, "description" : "Referrer reward type for the referral campaign\n\\* none -\n\nNone\n\\* custom_revenue_percent_based -\n\nCustom Revenue Percent Based\n\\* referral_direct_reward -\n\nReferral Direct Reward\n\\* custom_promotional_credit -\n\nCustom Promotional Credit\n", "enum" : [ "none", "referral_direct_reward", "custom_promotional_credit", "custom_revenue_percent_based" ], "example" : null }, "notify_referral_system" : { "type" : "string", "deprecated" : false, "description" : "Whether or not to notify the referral purchases to the referral system\n\\* first_paid_conversion -\n\nFirst Paid Conversion\n\\* none -\n\nNone\n\\* all_invoices -\n\nAll Invoices\n", "enum" : [ "none", "first_paid_conversion", "all_invoices" ], "example" : null }, "destination_url" : { "type" : "string", "deprecated" : false, "description" : "Destination url for the referral campaign\n", "maxLength" : 250, "example" : null }, "post_purchase_widget_enabled" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Whether post purchase widget is enabled for this campaign\n", "example" : null } }, "required" : [ "account_id", "campaign_id", "post_purchase_widget_enabled" ], "example" : null }, "billing_override" : { "type" : "object", "deprecated" : false, "description" : "Specify limits on how credits and excess payments are applied to individual invoices for the subscription. \\*\\*Prerequisite\\*\\* \\* \\[Credit flexibility\\](https://www.chargebee.com/docs/billing/2.0/invoices-credit-notes-and-quotes/credit-notes#credits-flexibility) must be enabled for the site. \\*\\*Constraints\\*\\* \\* These limits do not apply to \\[consolidated invoices\\](https://www.chargebee.com/docs/2.0/consolidated-invoicing.html).\n", "properties" : { "max_excess_payment_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of excess payments that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n\n

When this attribute is absent, the site-level Credit flexibility configuration applies.

", "minimum" : -1, "example" : null }, "max_refundable_credits_usage" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Maximum amount of refundable credits that can be automatically applied to a single invoice associated with this subscription.

\n

Supported values:

\n\n

When this attribute is absent, the site-level Credit flexibility configuration applies.

", "minimum" : -1, "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Contract terms for this subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id that uniquely identifies the contract term in the site.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of contract\n\\* terminated -\n\nThe contract term was terminated ahead of completion.\n\\* completed -\n\nThe contract term has run its full duration.\n\\* active -\n\nAn actively running contract term.\n\\* cancelled -\n\nThe contract term was ended because: - a change in the subscription caused a [subscription term reset](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#force_term_reset).\n\n* the subscription was cancelled due to non-payment.\n", "enum" : [ "active", "completed", "cancelled", "terminated" ], "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the contract term\n", "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "

Action to be taken when the contract term completes.

\n* 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.

\n\n* cancel -

Contract term completes and subscription is canceled.

\n* evergreen -

Contract term completes and the subscription renews.

\n* renew - ", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "

The sum of the totals\nof all the invoices raised as part of the contract term. For active\ncontract terms, this is a predicted value. The value depends on the type of currency.\nIf the subscription was imported\nwith the contract term, then this value includes the value passed for total_amount_raised\n.

", "minimum" : 0, "example" : null }, "total_contract_value_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "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\nis included in the calculation of the total contract value before tax. It's important to note that this value excludes any applicable taxes.

", "minimum" : 0, "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of days before contract_end\n, 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.

", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the contract term was created.\n", "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The [Id](/docs/api/subscriptions/subscription-object#id)\nof the subscription that this contract term is for.\n", "maxLength" : 50, "example" : null }, "remaining_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The number of subscription billing cycles remaining after the current one for the contract term. This attribute is only returned for active\ncontract terms.

", "minimum" : 0, "example" : null } }, "required" : [ "action_at_term_end", "billing_cycle", "contract_end", "contract_start", "created_at", "id", "status", "subscription_id", "total_contract_value", "total_contract_value_before_tax" ], "example" : null }, "discounts" : { "type" : "array", "deprecated" : false, "description" : "

List of discounts\ncurrently attached to the subscription.

\n

Note

", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An immutable unique id for the discount. It is always auto-generated.\n", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the discount as it should appear on customer-facing pages and documents such as invoices\nand hosted pages.\nThis is auto-generated based on the type\n, amount\n, and currency_code\nof the discount. For example, it can be 10% off\nor 10$ off\n.

", "maxLength" : 100, "example" : null }, "type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "

The type of discount.\nPossible value are:

\n* offer_quantity -

A specified number of units of the item price are offered for free. The number of free units is specified in quantity.\nThe offer_quantity\noption is valid only when apply_on\nis set to each_specified_item\nand the pricing_model\nof the item price is per_unit\n.

\n* percentage -

The specified percentage will be given as discount.

\n* fixed_amount -

The specified amount will be given as discount.

", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "The percentage of the original amount that should be deducted from it.\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the discount. [The format of this value](/docs/api/currencies)\ndepends on the kind of currency.\n", "minimum" : 0, "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Specifies the number of free units provided for the item, without affecting the total quantity sold. This parameter is applicable only when discount.type\nis offer_quantity.

\n", "minimum" : 1, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "

The currency code (ISO 4217 format\n) of the discount. This is only applicable when discount.type\nis fixed_amount\n.

", "maxLength" : 3, "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "

Specifies the time duration for which this discount is attached to the subscription.

\n\n* 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\nand period_unit\n.

\n* forever -

The discount is attached to the subscription and applied on the invoices till it is explicitly removed\n.

\n* one_time -

The discount stays attached to the subscription till it is applied on an invoice once.\nIt is removed after that from the subscription.

", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The duration of time for which the discount is attached to the subscription, in period_units.\nApplicable only when duration_type\nis limited_period.

\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nApplicable only when duration_type\nis limited_period.

\n\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

\n* day -

A period of 24 hours.

\n* month -

A period of 1 calendar month.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type\nis one_time\nand when the feature is enabled\nin Chargebee. Also, If the site-level setting\nis to exclude one-time discounts from MRR calculations, this value is always returned false.

\n", "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "

The amount on the invoice to which the discount is applied.

\n\n* invoice_amount -

The discount is applied to the invoice sub_total\n.

\n* specific_item_price -

The discount is applied to the invoice.line_item.amount\nthat corresponds to the item price specified by item_price_id\n.

", "enum" : [ "invoice_amount", "specific_item_price" ], "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "

The id of the item price\nin the subscription to which the discount is to be applied. Relevant only when apply_on\n= specific_item_price.

\n", "maxLength" : 100, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this discount is created.\n", "example" : null }, "apply_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

Specifies till when the limited period discount is applicable. This attribute will be sent in the response only for limited_period\nduration type discount.

", "example" : null }, "applied_count" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Specifies the number of times the discount has been applied.\n", "example" : null }, "coupon_id" : { "type" : "string", "deprecated" : false, "description" : "

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

\n

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.

", "maxLength" : 100, "example" : null }, "index" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The index number of the subscription to which the item price is added. Provide a unique number between 0\nand 4\n(inclusive) for each subscription that is to be created.

", "minimum" : 0, "example" : null } }, "required" : [ "apply_on", "coupon_id", "created_at", "duration_type", "id", "included_in_mrr", "index", "type" ], "example" : null }, "example" : null } }, "required" : [ "currency_code", "customer_id", "decommissioned", "deleted", "has_scheduled_advance_invoices", "has_scheduled_changes", "id", "status" ], "example" : null }, "SubscriptionActivatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "card", "customer", "invoice", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionActivatedWithBackdatingEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "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" }, "example" : null } }, "required" : [ "card", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionAdvanceInvoiceScheduleAddedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "advance_invoice_schedules" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" }, "example" : null } }, "required" : [ "advance_invoice_schedules", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionAdvanceInvoiceScheduleRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "advance_invoice_schedules" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" }, "example" : null } }, "required" : [ "advance_invoice_schedules", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionAdvanceInvoiceScheduleUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "advance_invoice_schedules" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" }, "example" : null } }, "required" : [ "advance_invoice_schedules", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionBusinessEntityChangedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "business_entity_transfer" : { "$ref" : "#/components/schemas/BusinessEntityTransfer" }, "subscription" : { "$ref" : "#/components/schemas/Subscription" } }, "required" : [ "business_entity_transfer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionCanceledWithBackdatingEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_notes" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/CreditNote" }, "example" : null }, "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "card", "credit_notes", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionCancellationReminderEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionCancellationScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionCancelledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_notes" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/CreditNote" }, "example" : null }, "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "card", "credit_notes", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionChangedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_notes" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/CreditNote" }, "example" : null }, "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "card", "credit_notes", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionChangedWithBackdatingEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_notes" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/CreditNote" }, "example" : null }, "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "card", "credit_notes", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionChangesScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "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" }, "example" : null } }, "required" : [ "card", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionCreatedWithBackdatingEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "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" }, "example" : null } }, "required" : [ "card", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionEntitlement" : { "type" : "object", "description" : "

Overview

The subscription entitlement object represents the entitlement a subscription holds for a feature. A subscription can have several subscription entitlements, each tied to a specific feature.

How subscription entitlements are determined

With subscription-level entitlement override

When an entitlement override with entity_type set to subscription is set for a subscription related to a feature, the subscription entitlement takes on the value of that override.

Without entitlement overrides

If there is no entitlement override for the subscription and feature, the subscription entitlement is based on the entitlements linked to the item prices within the subscription items. If an item price lacks an entitlement record for a particular feature, we consider the entitlement (when available) of its parent item.

The method used to derive the subscription entitlement from these entitlements follows specific rules determined by the feature type. We outline and provide examples of these rules in the sections below:

Switch feature

Summary

Consider a feature of type switch. Consider also a subscription whose subscription items correspond to item prices (or items) that have entitlements to the feature. Looking at these entitlements, we first determine the entitlement value held by each subscription item for this feature.

If the entitlement value for the feature held by any of the subscription items is true, then the subscription entitlement value is also set to true. Otherwise, the subscription entitlement value is set to false.

Example

1. Feature record

Consider the following feature record:

Table 1: Feature records.
idtypedescription
xero-integrationswitchAn integration with the Xero accounting software.
2. Entitlement records

Consider the following entitlement records for the xero-integration feature:

Table 2: Entitlement records for the xero-integration feature.
entity_identity_typevalue
starterplantrue
starter-monthly-usdplan_pricefalse
plusaddontrue
3. Subscription-items records

Consider that a subscription with ID AzZjAiTl1btqS2lEj has the following subscription_items[] records:

Table 3: Subscription-items records.
Indexitem_price_idquantity
0starter-monthly-usd1
1plus-monthly-usd1
2installation-usd2
4. Subscription-item entitlements

Chargebee Billing now determines the entitlement held by each subscription item based on the entitlements defined in Table 2. This is shown in Table 4. For clarity, we've omitted the quantity column because it doesn't affect features with type switch.

Table 4: Entitlement values for subscription-items.
Indexitem_price_idEntitlement value (determined from Table 2)
0starter-monthly-usdfalse (Matches the value of the plan price.)
1plus-monthly-usdtrue (Inherited from the addon plus, as no entitlement is defined for this addon price.)
2installation-usdNone (No entitlement defined for the charge item.)
5. Determining final subscription entitlements
Case 1: Absence of a subscription-level override

In this scenario, the final entitlement (subscription_entitlement.value) for the xero-integration feature is set to true because at least one subscription-item entitlement value is true.

Case 2: With subscription-level override

Suppose there's an entitlement override added to the subscription for the feature, as shown below:

Table 5: Entitlement override record for the subscription and feature.
entity_identity_typefeature_idvalue
AzZjAiTl1btqS2lEjsubscriptionxero-integrationfalse

Given this override, the subscription's final entitlement value for the xero-integration feature is set to false.

Quantity feature

Summary

Consider a feature of type quantity. Consider also a subscription whose subscription items correspond to item prices (or items) that have entitlements to the feature. Looking at these entitlements, we first determine the entitlement value held by each subscription item for this feature.

If the entitlement value for the feature held by any of the subscription items is unlimited, then the subscription entitlement value is also unlimited. Otherwise, the subscription entitlement value is the sum of all the entitlement values of the subscription items.

Example

1. Feature record

Consider the following feature record:

Table 6: Feature records.
idtypedescription
user_licensesquantityThe number of user licenses provided.

Suppose that the feature has feature.levels[] records as follows:

Table 7: Feature levels records.
levelvalueis_unlimited
05false
110false
220false
3Not set.true
2. Entitlement records

Consider the following entitlement records for the user_licenses feature:

Table 8: Entitlement records for the user_licenses feature.
entity_identity_typevalue
starterplan10
starter-monthly-usdplan_priceunlimited
plusaddon5
one-timecharge5
3. Subscription-items records

Consider that a subscription with ID AzZjAiTl1btqS2lEj has the following subscription_items[] records:

Table 9: Subscription-items records.
Indexitem_price_idquantity
0starter-monthly-usd5
1plus-monthly-usd10
2one-time-usd1
4. Subscription-item entitlements

Chargebee Billing now determines the entitlement held by each subscription item based on the entitlements defined in Table 8. This is shown in Table 10.

Table 10: Entitlement values for subscription-items.
Indexitem_price_idquantityEntitlement value (determined from Table 8)Entitlement value subtotal (Entitlement value × quantity)
0starter-monthly-usd5unlimited (Matches the value of the plan price.)unlimited (unlimited x 5)
1plus-monthly-usd105 (Inherited from the addon plus, as no entitlement is defined for this addon price.)50 (5 x 10)
2one-time-usd15 (Inherited from the charge one-time.)5 (5 x 1)
5. Determining final subscription entitlements
Case 1: Absence of a subscription-level override

In this scenario, the final entitlement value (subscription_entitlement.value) for the user_licenses feature is the total entitlement value from the last column in Table 10, which amounts to (unlimited + 50 + 5) = unlimited.

Case 2: With subscription-level override

Suppose there's an entitlement override added to the subscription for the feature, as shown below:

Table 11: Entitlement override record for the subscription and feature.
entity_identity_typefeature_idvalue
AzZjAiTl1btqS2lEjsubscriptionuser_licenses20

Given this override, the subscription's final entitlement value for the user_licenses feature is set to 20.

Range feature

Summary

Consider a feature of type range. Consider also a subscription whose subscription items correspond to item prices (or items) that have entitlements to the feature. Looking at these entitlements, we first determine the entitlement value held by each subscription item for this feature.

If the entitlement value for the feature held by any of the subscription items is unlimited, then the subscription entitlement value is also unlimited. Otherwise, one of two scenarios are possible:

    \n
  • \n

    If feature.levels[1].is_unlimited is true, the subscription entitlement value equals the sum of all entitlement values of the subscription items.

    \n
  • \n
  • \n

    If feature.levels[1].is_unlimited is false, the subscription entitlement value equals the sum of all entitlement values of the subscription items without exceeding the maximum value of feature.level[1].value.

    \n
  • \n

Example

1. Feature record

Consider the following feature record:

Table 12: Feature records.
idtypedescription
api_rate_limitrangeThe maximum number of API requests allowed per minute.

Suppose that the feature has feature.levels[] records as follows:

Table 13: Feature levels records.
levelvalueis_unlimited
0100false
11000false
2. Entitlement records

Consider the following entitlement records for the api_rate_limit feature:

Table 14: Entitlement records for the api_rate_limit feature.
entity_identity_typevalue
premiumplan450
premium-monthly-usdplan_price400
plusaddon150
3. Subscription-items records

Consider that a subscription with ID AzZjAiTl1btqS2lEj has the following subscription_items[] records:

Table 15: Subscription-items records.
Indexitem_price_idquantity
0premium-monthly-usd2
1plus-monthly-usd2
4. Subscription-item entitlements

Chargebee Billing now determines the entitlement held by each subscription item based on the entitlements defined in Table 14. This is shown in Table 16.

Table 16: Entitlement values for subscription-items.
subscription_items[] indexitem_price_idquantityEntitlement value (determined from Table 14)Entitlement value subtotal (Entitlement value x quantity)
0premium-monthly-usd2400 (Matches the value of the plan price.)800 (400 x 2)
1plus-monthly-usd2150 (Inherited from the addon plus, as no entitlement is defined for this addon price.)300 (150 x 2)
5. Determining final subscription entitlements
Case 1: feature.levels[1].is_unlimited is false

In this scenario, the final entitlement value (subscription_entitlement.value) for the api_rate_limit feature is the total entitlement value from the last column in Table 16, capped at feature.levels[1].value. The total entitlement value is 800 + 300 = 1100. However, feature.levels[1].value is 1000, which is less than 1100. Therefore, the final entitlement is 1000.

Case 2: feature.levels[1].is_unlimited is true

In this scenario, feature.levels[1].value is disregarded, and the final entitlement value is not capped. In other words, the final entitlement value is 1100.

Custom feature

Summary

Consider a feature of type custom. Consider also a subscription whose subscription items correspond to item prices (or items) that have entitlements to the feature.

Looking at these entitlements, we first determine the entitlement value held by each subscription item for this feature. The subscription entitlement value is then set to the highest of these identified values.

Example

1. Feature record

Consider the following feature record:

Table 17: Feature records.
idtypedescription
supportcustomThe form of after-sales support provided to the customer.

Suppose that the feature has feature.levels[] records as follows:

Table 18: Feature levels records.
levelvalue
0email
1chat
2call
2. Entitlement records

Consider the following entitlement records for the support feature:

Table 19: Entitlement records for the api_rate_limit feature.
entity_identity_typevalue
starterplanchat
starter-monthly-usdplan_priceemail
plusaddoncall
3. Subscription-items records

Consider that a subscription with ID AzZjAiTl1btqS2lEj has the following subscription_items[] records:

Table 20: Subscription-items records.
Indexitem_price_idquantity
0starter-monthly-usd2
1plus-monthly-usd2
4. Subscription-item entitlements

Chargebee Billing now determines the entitlement held by each subscription item based on the entitlements defined in Table 19. This is shown in Table 21. For clarity, we've omitted the quantity column because it doesn't affect features with type custom.

Table 21: Entitlement values for subscription-items.
Indexitem_price_idSubscription-Item Entitlement Value (determined from Table )
0starter-monthly-usdemail (Matches the value of the plan price.)
1plus-monthly-usdcall (Inherited from the addon plus, as no entitlement is defined for this addon price.)
5. Determining final subscription entitlements
Case 1: Absence of a subscription-level override

In this scenario, the final entitlement for the support feature is the highest of all the subscription-item entitlement values, which in this case is call.

Case 2: With subscription-level override

Suppose there's an entitlement override added to the subscription for the feature, as shown below:

Table 22: Entitlement override record for the subscription and feature.
entity_identity_typefeature_idvalueexpires_at
AzZjAiTl1btqS2lEjsubscriptionsupportchat1695884985 (7 days from now, assuming today is 2023-09-21.)

Given this override, the subscription's final entitlement value for the support feature will be chat until 2023-09-21 and call thereafter.

With other entity-level entitlement overrides

When an entitlement override with entity_type set to plan_price, addon_price, or charge is set for a subscription, the override affects the entitlement value used for that specific entity when calculating subscription-item entitlements. If an entitlement override exists for a plan price, addon price, or charge entity, its value is used instead of the regular entitlement value for that entity.

The method used to derive the subscription entitlement from these overridden values follows the same rules determined by the feature type as described in the sections above. We outline and provide examples of these rules in the sections below:

Switch feature

Summary

When calculating subscription-item entitlements for a feature of type switch, if an entitlement override exists for a plan price, addon price, or charge entity, the override's value is used instead of the regular entitlement value for that entity. The final subscription entitlement value is then determined using the same logic as described in the Switch feature section: if the entitlement value for the feature held by any of the subscription items is true, then the subscription entitlement value is also set to true. Otherwise, the subscription entitlement value is set to false.

Example

1. Feature record

Consider the following feature record:

Table 23: Feature records.
idtypedescription
xero-integrationswitchAn integration with the Xero accounting software.
2. Entitlement records

Consider the following entitlement records for the xero-integration feature:

Table 24: Entitlement records for the xero-integration feature.
entity_identity_typevalue
starterplantrue
starter-monthly-usdplan_pricefalse
plusaddonfalse
3. Subscription-items records

Consider that a subscription with ID AzZjAiTl1btqS2lEj has the following subscription_items[] records:

Table 25: Subscription-items records.
Indexitem_price_idquantity
0starter-monthly-usd1
1plus-monthly-usd1
4. Entitlement override records

Suppose there's an entitlement override added to the subscription for the plus-monthly-usd addon price, as shown below:

Table 26: Entitlement override record for the addon price and feature.
entity_identity_typefeature_idvalue
plus-monthly-usdaddon_pricexero-integrationtrue
5. Subscription-item entitlements

Chargebee Billing now determines the entitlement held by each subscription item based on the entitlements defined in Table 24, but uses the override value from Table 26 for the plus-monthly-usd addon price. This is shown in Table 27. For clarity, we've omitted the quantity column because it doesn't affect features with type switch.

Table 27: Entitlement values for subscription-items.
Indexitem_price_idEntitlement value
0starter-monthly-usdfalse (Matches the value of the plan price entitlement.)
1plus-monthly-usdtrue (Uses the override value from Table 26 instead of inheriting false from the addon plus.)
6. Determining final subscription entitlements

In this scenario, the final entitlement for the xero-integration feature is set to true because at least one subscription-item entitlement value is true (the overridden value for plus-monthly-usd).

Quantity feature

Summary

When calculating subscription-item entitlements for a feature of type quantity, if an entitlement override exists for a plan price, addon price, or charge entity, the override's value is used instead of the regular entitlement value for that entity. The final subscription entitlement value is then determined using the same logic as described in the Quantity feature section: if the entitlement value for the feature held by any of the subscription items is unlimited, then the subscription entitlement value is also unlimited. Otherwise, the subscription entitlement value is the sum of all the entitlement values of the subscription items.

Example

1. Feature record

Consider the following feature record:

Table 28: Feature records.
idtypedescription
user_licensesquantityThe number of user licenses provided.

Suppose that the feature has feature.levels[] records as follows:

Table 29: Feature levels records.
levelvalueis_unlimited
05false
110false
220false
2. Entitlement records

Consider the following entitlement records for the user_licenses feature:

Table 30: Entitlement records for the user_licenses feature.
entity_identity_typevalue
starterplan10
starter-monthly-usdplan_price5
plusaddon5
one-timecharge5
3. Subscription-items records

Consider that a subscription with ID AzZjAiTl1btqS2lEj has the following subscription_items[] records:

Table 31: Subscription-items records.
Indexitem_price_idquantity
0starter-monthly-usd2
1plus-monthly-usd3
2one-time-usd1
4. Entitlement override records

Suppose there are entitlement override records added to the subscription for the plan price and charge, as shown below:

Table 32: Entitlement override records for the plan price and charge.
entity_identity_typefeature_idvalue
starter-monthly-usdplan_priceuser_licenses10
one-timechargeuser_licenses10
5. Subscription-item entitlements

Chargebee Billing now determines the entitlement held by each subscription item based on the entitlements defined in Table 30, but uses the override values from Table 32 for the starter-monthly-usd plan price and one-time charge. This is shown in Table 33.

Table 33: Entitlement values for subscription-items.
Indexitem_price_idquantityEntitlement valueEntitlement value subtotal (Entitlement value × quantity)
0starter-monthly-usd210 (Uses the override value from Table 32 instead of the plan price entitlement value of 5.)20 (10 x 2)
1plus-monthly-usd35 (Inherited from the addon plus, as no entitlement is defined for this addon price and no override exists.)15 (5 x 3)
2one-time-usd110 (Uses the override value from Table 32 instead of the charge entitlement value of 5.)10 (10 x 1)
6. Determining final subscription entitlements

In this scenario, the final entitlement value for the user_licenses feature is the total entitlement value from the last column in Table 33, which amounts to (20 + 15 + 10) = 45.

Range feature

Summary

When calculating subscription-item entitlements for a feature of type range, if an entitlement override exists for a plan price, addon price, or charge entity, the override's value is used instead of the regular entitlement value for that entity. The final subscription entitlement value is then determined using the same logic as described in the Range feature section: if the entitlement value for the feature held by any of the subscription items is unlimited, then the subscription entitlement value is also unlimited. Otherwise, one of two scenarios are possible:

    \n
  • \n

    If feature.levels[1].is_unlimited is true, the subscription entitlement value equals the sum of all entitlement values of the subscription items.

    \n
  • \n
  • \n

    If feature.levels[1].is_unlimited is false, the subscription entitlement value equals the sum of all entitlement values of the subscription items without exceeding the maximum value of feature.level[1].value.

    \n
  • \n

Example

1. Feature record

Consider the following feature record:

Table 34: Feature records.
idtypedescription
api_rate_limitrangeThe maximum number of API requests allowed per minute.

Suppose that the feature has feature.levels[] records as follows:

Table 35: Feature levels records.
levelvalueis_unlimited
0100false
11000false
2. Entitlement records

Consider the following entitlement records for the api_rate_limit feature:

Table 36: Entitlement records for the api_rate_limit feature.
entity_identity_typevalue
premiumplan450
premium-monthly-usdplan_price400
plusaddon150
3. Subscription-items records

Consider that a subscription with ID AzZjAiTl1btqS2lEj has the following subscription_items[] records:

Table 37: Subscription-items records.
Indexitem_price_idquantity
0premium-monthly-usd2
1plus-monthly-usd2
4. Entitlement override records

Suppose there's an entitlement override added to the subscription for the addon price, as shown below:

Table 38: Entitlement override record for the addon price and feature.
entity_identity_typefeature_idvalue
plus-monthly-usdaddon_priceapi_rate_limit300
5. Subscription-item entitlements

Chargebee Billing now determines the entitlement held by each subscription item based on the entitlements defined in Table 36, but uses the override value from Table 38 for the plus-monthly-usd addon price. This is shown in Table 39.

Table 39: Entitlement values for subscription-items.
Indexitem_price_idquantityEntitlement valueEntitlement value subtotal (Entitlement value × quantity)
0premium-monthly-usd2400 (Matches the value of the plan price.)800 (400 x 2)
1plus-monthly-usd2300 (Uses the override value from Table 38 instead of inheriting 150 from the addon plus.)600 (300 x 2)
6. Determining final subscription entitlements
Case 1: feature.levels[1].is_unlimited is false

In this scenario, the final entitlement value for the api_rate_limit feature is the total entitlement value from the last column in Table 39, capped at feature.levels[1].value. The total entitlement value is 800 + 600 = 1400. However, feature.levels[1].value is 1000, which is less than 1400. Therefore, the final entitlement is 1000.

Case 2: feature.levels[1].is_unlimited is true

In this scenario, feature.levels[1].value is disregarded, and the final entitlement value is not capped. In other words, the final entitlement value is 1400.

Custom feature

Summary

When calculating subscription-item entitlements for a feature of type custom, if an entitlement override exists for a plan price, addon price, or charge entity, the override's value is used instead of the regular entitlement value for that entity. The final subscription entitlement value is then determined using the same logic as described in the Custom feature section: the subscription entitlement value is set to the highest of the identified subscription-item entitlement values.

Example

1. Feature record

Consider the following feature record:

Table 40: Feature records.
idtypedescription
supportcustomThe form of after-sales support provided to the customer.

Suppose that the feature has feature.levels[] records as follows:

Table 41: Feature levels records.
levelvalue
0email
1chat
2call
2. Entitlement records

Consider the following entitlement records for the support feature:

Table 42: Entitlement records for the support feature.
entity_identity_typevalue
starterplanchat
starter-monthly-usdplan_priceemail
plusaddonemail
3. Subscription-items records

Consider that a subscription with ID AzZjAiTl1btqS2lEj has the following subscription_items[] records:

Table 43: Subscription-items records.
Indexitem_price_idquantity
0starter-monthly-usd2
1plus-monthly-usd2
4. Entitlement override records

Suppose there's an entitlement override added to the subscription for the addon price, as shown below:

Table 44: Entitlement override record for the addon price and feature.
entity_identity_typefeature_idvalue
plus-monthly-usdaddon_pricesupportcall
5. Subscription-item entitlements

Chargebee Billing now determines the entitlement held by each subscription item based on the entitlements defined in Table 42, but uses the override value from Table 44 for the plus-monthly-usd addon price. This is shown in Table 45. For clarity, we've omitted the quantity column because it doesn't affect features with type custom.

Table 45: Entitlement values for subscription-items.
Indexitem_price_idSubscription-Item Entitlement Value
0starter-monthly-usdemail (Matches the value of the plan price.)
1plus-monthly-usdcall (Uses the override value from Table 44 instead of inheriting email from the addon plus.)
6. Determining final subscription entitlements

In this scenario, the final entitlement for the support feature is the highest of all the subscription-item entitlement values, which in this case is call (the overridden value for plus-monthly-usd).

", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [subscription](/docs/api/subscriptions)\n.\n", "maxLength" : 50, "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the [feature](/docs/api/features)\n.\n", "maxLength" : 50, "example" : null }, "feature_name" : { "type" : "string", "deprecated" : false, "description" : "The [name of the feature](/docs/api/features/feature-object#name)\n.\n", "maxLength" : 50, "example" : null }, "feature_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of measure\nfor the feature when its type\nis either quantity\nor range\n.

", "maxLength" : 50, "example" : null }, "feature_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the [type of the feature](/docs/api/features/feature-object#type)\nassociated with the granted subscription entitlement.\n", "maxLength" : 50, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "The value denoting the final entitlement level that the subscription holds for the feature. \n**See also:**\n[How subscription entitlements are determined](/docs/api/subscription_entitlements).\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

The display name of the final entitlement level that the subscription holds for the feature. It is derived based on the type\nof feature as follows: - When feature.type is range or quantity: the name is the space-separated concatenation of value and the pluralized form of feature_unit. For example, if value is 20 and feature_unit is user, then name becomes 20 users.

\n", "maxLength" : 50, "example" : null }, "is_overridden" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates whether the entitlement held by the subscription for the feature is overridden via an entitlement_overrides\nrecord.

", "example" : null }, "is_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "

Indicates that components.is_enabled\nexists.

", "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the subscription entitlements are going to expire.\n", "example" : null }, "components" : { "type" : "object", "deprecated" : false, "description" : "

The component entitlements that constitute this subscription_entitlement.\nThe effective entitlement value\nand name\nare determined from these component entitlements.

", "properties" : { "entitlement_overrides" : { "type" : "object", "deprecated" : false, "description" : "

When a subscription entitlement has been explicitly overridden, this object contains the details of said override. An entitlement_override\ncan be temporary\nsuch that it expires at some point in time and is no longer returned.

", "properties" : { "value" : { "type" : "string", "deprecated" : false, "description" : "

The level of entitlement that the subscription has towards the feature. The possible values depend on the value of feature.type\n:

\n", "maxLength" : 50, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

A case-sensitive name for the subscription entitlement override. If it was not provided while creating this subscription entitlement override, then it is derived based on the feature.type\nas follows:

\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "example" : null } }, "required" : [ "is_enabled", "is_overridden", "subscription_id" ], "example" : null }, "SubscriptionEntitlementsCreatedDetail" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "has_next" : { "type" : "boolean", "deprecated" : false, "example" : null } }, "required" : [ "has_next" ], "example" : null }, "SubscriptionEntitlementsCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription_entitlements_created_detail" : { "$ref" : "#/components/schemas/SubscriptionEntitlementsCreatedDetail" } }, "required" : [ "subscription_entitlements_created_detail" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionEntitlementsUpdatedDetail" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "has_next" : { "type" : "boolean", "deprecated" : false, "example" : null } }, "required" : [ "has_next" ], "example" : null }, "SubscriptionEntitlementsUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription_entitlements_updated_detail" : { "$ref" : "#/components/schemas/SubscriptionEntitlementsUpdatedDetail" } }, "required" : [ "subscription_entitlements_updated_detail" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionEstimate" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "maxLength" : 3, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "next_billing_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "maxLength" : 20, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "enum" : [ "active", "completed", "cancelled", "terminated" ], "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "total_contract_value_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "remaining_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null } }, "required" : [ "action_at_term_end", "billing_cycle", "contract_end", "contract_start", "created_at", "id", "status", "subscription_id", "total_contract_value", "total_contract_value_before_tax" ], "example" : null } }, "required" : [ "currency_code" ], "example" : null }, "SubscriptionGrantConfiguration" : { "type" : "object", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "unit_type" : { "type" : "string", "deprecated" : false, "enum" : [ "feature", "custom_pricing_unit" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "enum" : [ "plan_price", "addon", "addon_price", "charge", "charge_price" ], "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "subscription_item_quantity" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "grant_configuration_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "grant_configuration_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "is_metered" : { "type" : "boolean", "deprecated" : false, "example" : null }, "derivation_type" : { "type" : "string", "deprecated" : false, "enum" : [ "inherited", "overridden" ], "example" : null }, "grant_configuration_resource_version" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "grant_policies" : { "type" : "array", "deprecated" : false, "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "trigger_type" : { "type" : "string", "deprecated" : false, "enum" : [ "interval", "one_time" ], "example" : null }, "trigger_value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "trigger_period_unit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "month", "year" ], "example" : null }, "rollover_type" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "none", "unlimited", "time_limited", "capped" ], "example" : null }, "rollover_cap_value" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "rollover_cap_type" : { "type" : "string", "deprecated" : false, "enum" : [ "percentage", "absolute" ], "example" : null }, "expiration_type" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "none", "interval" ], "example" : null }, "expiration_value" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "expiration_period_unit" : { "type" : "string", "deprecated" : false, "enum" : [ "day", "month", "year" ], "example" : null } }, "required" : [ "amount", "expiration_type", "id", "rollover_type", "trigger_type" ], "example" : null }, "example" : null } }, "required" : [ "derivation_type", "entity_id", "grant_configuration_id", "grant_configuration_resource_version", "grant_configuration_version", "is_metered", "subscription_id", "subscription_item_quantity", "unit_id" ], "example" : null }, "SubscriptionHistory" : { "type" : "object", "description" : "This resource returns the subscription history.\n", "properties" : { "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the item price.\n", "maxLength" : 100, "example" : null }, "item_type" : { "type" : "string", "deprecated" : false, "description" : "Type of items.\n\\* addon -\n\naddon\n\\* plan -\n\nplan\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "active_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp to indicate from when this item was attached to the subscription\n", "example" : null }, "active_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp to indicate till when this item was attached to the subscription\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp to indicate when this subscription was created.\n", "example" : null }, "item_unit_amount_in_cents" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "actual_item_unit_amount_in_cents" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "item_amount_in_cents" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "actual_item_amount_in_cents" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "rating_group_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, "example" : null }, "SubscriptionItemsRenewedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_notes" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/CreditNote" }, "example" : null }, "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "card", "credit_notes", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionMetric" : { "type" : "object", "properties" : { "subscription_status" : { "type" : "string", "deprecated" : false, "enum" : [ "in_trial", "active" ], "example" : null }, "count" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "last_updated_at" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "example" : null } }, "example" : null }, "SubscriptionMovedInEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" } }, "required" : [ "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionMovedOutEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" } }, "required" : [ "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionMovementFailedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" } }, "required" : [ "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionPauseScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionPausedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_notes" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/CreditNote" }, "example" : null }, "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "card", "credit_notes", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionPreview" : { "type" : "object", "description" : "This resource returns subscription preview attributes.\n", "properties" : { "billing_event" : { "type" : "string", "deprecated" : false, "description" : "Describes the time in the subscription lifecycle when the charge is to occur.\n\\* subscription_changed -\n\nSubscription Changed\n\\* subscription_resumed -\n\nSubscription Resumed\n\\* subscription_renewed -\n\nSubscription Renewed\n\\* subscription_activated -\n\nSubscription Activated\n\\* subscription_cancelled -\n\nSubscription Cancelled\n\\* subscription_started -\n\nSubscription Started\n\\* subscription_paused -\n\nSubscription Paused\n\\* subscription_created -\n\nSubscription Created\n", "enum" : [ "subscription_created", "subscription_changed", "subscription_renewed", "subscription_cancelled", "subscription_resumed", "subscription_paused", "subscription_started", "subscription_activated" ], "example" : null }, "billing_sequence_number" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Billing sequence number.\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp to indicate when the event was occurred.\n", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "JSON object representing subscription\n", "example" : null }, "invoices" : { "type" : "array", "deprecated" : false, "description" : "JSON object representing invoice\n", "items" : { "example" : null }, "example" : null }, "credit_notes" : { "type" : "array", "deprecated" : false, "description" : "JSON object representing credit_notes\n", "items" : { "example" : null }, "example" : null }, "unbilled_charges" : { "type" : "array", "deprecated" : false, "description" : "Represents the preview of the unbilled charges generated during 'estimate' operation.\n", "items" : { "example" : null }, "example" : null } }, "required" : [ "subscription" ], "example" : null }, "SubscriptionRampAppliedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp" } }, "required" : [ "ramp" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionRampCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp" } }, "required" : [ "ramp" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionRampDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp" } }, "required" : [ "ramp" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionRampDraftedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp" } }, "required" : [ "ramp" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionRampUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "ramp" : { "$ref" : "#/components/schemas/Ramp" } }, "required" : [ "ramp" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionReactivatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "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" }, "example" : null } }, "required" : [ "card", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionReactivatedWithBackdatingEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "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" }, "example" : null } }, "required" : [ "card", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionRenewalReminderEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionRenewedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "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" }, "example" : null } }, "required" : [ "card", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionResumedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "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" }, "example" : null } }, "required" : [ "card", "customer", "invoice", "subscription", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionResumptionScheduledEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionScheduledCancellationRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionScheduledChange" : { "type" : "object", "properties" : { "action_type" : { "type" : "string", "deprecated" : false, "enum" : [ "cancel", "pause", "reactivate" ], "example" : null }, "data" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "action_type", "created_at", "modified_at" ], "example" : null }, "SubscriptionScheduledChangesRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionScheduledPauseRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionScheduledResumptionRemovedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionSetting" : { "type" : "object", "properties" : { "subscription_cancellation" : { "type" : "object", "deprecated" : false, "properties" : { "effective_from" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "end_of_term", "specific_date" ], "example" : null }, "credit_option" : { "type" : "string", "deprecated" : false, "enum" : [ "none", "prorate", "full", "consumption_based" ], "example" : null }, "refund_option" : { "type" : "string", "deprecated" : false, "enum" : [ "no_action", "schedule_refund" ], "example" : null }, "account_receivable_handling" : { "type" : "string", "deprecated" : false, "enum" : [ "no_action", "schedule_payment_collection", "write_off" ], "example" : null }, "unbilled_charge_option" : { "type" : "string", "deprecated" : false, "enum" : [ "invoice", "delete" ], "example" : null }, "apply_credits" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null } }, "example" : null }, "pause_subscription" : { "type" : "object", "deprecated" : false, "properties" : { "enabled" : { "type" : "boolean", "deprecated" : false, "example" : null }, "effective_from" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "end_of_term", "specific_date" ], "example" : null }, "pause_resumption" : { "type" : "string", "deprecated" : false, "enum" : [ "pause_indefinitely", "specific_date" ], "example" : null }, "unbilled_charges" : { "type" : "string", "deprecated" : false, "enum" : [ "no_action", "invoice" ], "example" : null }, "invoice_in_dunning" : { "type" : "string", "deprecated" : false, "enum" : [ "continue", "stop" ], "example" : null }, "resumption" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "specific_date" ], "example" : null }, "invoice_option" : { "type" : "string", "deprecated" : false, "enum" : [ "invoice_immediately", "add_to_unbilled_charges" ], "example" : null }, "account_receivable" : { "type" : "string", "deprecated" : false, "enum" : [ "no_action", "collect_payment" ], "example" : null } }, "example" : null }, "gift_subscription" : { "type" : "object", "deprecated" : false, "properties" : { "enabled" : { "type" : "boolean", "deprecated" : false, "example" : null }, "automatically_claim_gifts" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "allow_customer_to_claim_gifts_anytime" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "claim_validity_days" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null } }, "example" : null } }, "example" : null }, "SubscriptionShippingAddressUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionStartedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "card", "customer", "invoice", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionTrialEndReminderEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "SubscriptionTrialExtendedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer" }, "card" : { "$ref" : "#/components/schemas/Card" }, "advance_invoice_schedule" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule" } }, "required" : [ "advance_invoice_schedule", "card", "customer", "subscription" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "TaxExemptReason" : { "type" : "string", "deprecated" : false, "enum" : [ "tax_not_configured", "region_non_taxable", "export", "customer_exempt", "product_exempt", "zero_rated", "reverse_charge", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "TaxJurisType" : { "type" : "string", "deprecated" : false, "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "TaxOverrideReason" : { "type" : "string", "deprecated" : false, "enum" : [ "zero_rated", "id_exempt", "customer_exempt", "region_non_taxable", "product_exempt", "export", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "TaxWithheld" : { "type" : "object", "description" : "

Tax regulations in many countries allow taxes to be deducted by the buyer while making payments for products and services. The buyer then pays this tax to the taxation authority. The tax_withheld resource captures the details of such tax deductions.

Note:

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "

An auto-generated unique identifier for the tax withheld. The value starts with the prefix tax_wh_.\nFor example, tax_wh_16BdDXSlbu4uV1Ee6\n.

", "maxLength" : 40, "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "The description for this tax withheld.\n", "maxLength" : 65000, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date or time associated with the tax withheld.\n", "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount withheld by the customer as tax from the invoice. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "id" ], "example" : null }, "TaxWithheldDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "tax_withheld" : { "$ref" : "#/components/schemas/TaxWithheld" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote" } }, "required" : [ "credit_note", "invoice", "tax_withheld" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "TaxWithheldRecordedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "tax_withheld" : { "$ref" : "#/components/schemas/TaxWithheld" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote" } }, "required" : [ "credit_note", "invoice", "tax_withheld" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "TaxWithheldRefundedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "tax_withheld" : { "$ref" : "#/components/schemas/TaxWithheld" }, "invoice" : { "$ref" : "#/components/schemas/Invoice" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote" } }, "required" : [ "credit_note", "invoice", "tax_withheld" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "enum" : [ "taxable", "exempt" ], "example" : null }, "TaxjarExemptionCategory" : { "type" : "string", "deprecated" : false, "enum" : [ "wholesale", "government", "other" ], "example" : null }, "ThirdPartyPaymentMethod" : { "type" : "object", "description" : "Used when you want to copy card information between two gateways (such as copying cards between Authorize.Net and Stripe). Will contain details of the payment method type (card, Amazon Payments, etc.), name of the gateway, and the reference ID that the gateway uses to identify the specific card.\n", "properties" : { "type" : { "type" : "string", "default" : "card", "deprecated" : false, "description" : "Type of the payment method.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* sepa_instant_transfer -\n\nPayments made via Sepa Instant Transfer\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* pay_to -\n\nPayments made via PayTo\n\\* klarna -\n\nPayments made via Klarna.\n\\* revolut_pay -\n\nPayments made via Revolut Pay.\n\\* naver_pay -\n\nPayments made via Naver Pay.\n\\* giropay -\n\nPayments made via giropay.\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* stablecoin -\n\nPayments made via Stablecoin.\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* kakao_pay -\n\nPayments made via Kakao Pay.\n\\* sofort -\n\nPayments made via Sofort.\n\\* gcash -\n\nPayments made via GCash.\n\\* dana -\n\nPayments made via Dana.\n\\* pix -\n\nPayments made via Pix\n\\* pay_co -\n\nPayments made via PayCo\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* go_pay -\n\nPayments made via GoPay\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* pay_by_bank -\n\nPay By Bank\n\\* online_banking_poland -\n\nPayments made via Online Banking Poland\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* after_pay -\n\nPayments made via Afterpay\n\\* faster_payments -\n\nPayments made via Faster Payments\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* payme -\n\nPayments made via PayMe\n\\* tamara -\n\nPayments made via Tamara.\n\\* klarna_pay_now -\n\nPayments made via Klarna Pay Now\n\\* twint -\n\nPayments made via Twint\n\\* swish -\n\nPayments made via Swish\n\\* automated_bank_transfer -\n\nRepresents virtual bank account using which the payment will be done.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* venmo -\n\nPayments made via Venmo\n\\* ideal -\n\nPayments made via iDEAL.\n\\* trustly -\n\nTrustly\n\\* upi -\n\nUPI Payments.\n\\* kbc_payment_button -\n\nKBC Payment Button\n\\* cash_app_pay -\n\nPayments made via Cash App Pay.\n\\* payconiq_by_bancontact -\n\nPayments made via Payconiq by Bancontact.\n\\* qpay -\n\nPayments made via Qpay.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "Name of the gateway this card is stored with.\n\\* twikey -\n\nTwikey is a payment service provider that specializes in processing direct debit payments across the EU.\n\\* bluesnap -\n\nBlueSnap is a payment gateway.\n\\* jp_morgan -\n\nJ.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different [payment_source_type](/docs/api/payment_sources/payment_source-object#type). \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/jp-morgan-bacs&ref=feature) to enable the J.P. Morgan Mobility Payment Solutions gateway via payFURL for your test and live sites.\n\\* tco -\n\n2Checkout is a payment gateway.\n\\* deutsche_bank -\n\nDeutsche Bank is the leading German bank with strong European roots and a global network. \nThis feature is a **Private Beta Release**.\n\\* bluepay -\n\nBluePay is a payment gateway.\n\\* paypal_express_checkout -\n\nPayPal Express Checkout is a payment gateway.\n\\* paypal_payflow_pro -\n\nPayPal Payflow Pro is a payment gateway.\n\\* razorpay -\n\nRazorpay 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.\n\\* global_payments -\n\nGlobal Payments is a payment service provider.\n\\* dlocal -\n\nDlocal provides payment solutions for global commerce by accepting local payment methods.\n\\* not_applicable -\n\nIndicates that payment gateway is not applicable for this resource.\n\\* checkout_com -\n\nCheckout.com is a payment gateway.\n\\* adyen -\n\nAdyen is a payment gateway.\n\\* braintree -\n\nBraintree is a payment gateway.\n\\* nmi -\n\nNMI is a payment gateway.\n\\* worldpay -\n\nWorldPay is a payment gateway\n\\* paystack -\n\nPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/paystack&ref=feature) to enable Paystack for your test and live sites.\n\\* pay_com -\n\nPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n\\* moneris_us -\n\nMoneris USA is a payment gateway.\n\\* pin -\n\nPin is a payment gateway\n\\* authorize_net -\n\nAuthorize.net is a payment gateway\n\\* stripe -\n\nStripe is a payment gateway.\n\\* moneris -\n\nMoneris is a payment gateway.\n\\* chargebee -\n\nChargebee test gateway.\n\\* cybersource -\n\nCyberSource is a payment gateway.\n\\* ecentric -\n\nEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n\\* first_data_global -\n\nFirst Data Global Gateway Virtual Terminal Account\n\\* exact -\n\nExact Payments is a payment gateway.\n\\* nuvei -\n\nNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/nuvei&ref=feature) to enable Nuvei for your test and live sites.\n\\* eway -\n\neWAY Account is a payment gateway.\n\\* metrics_global -\n\nMetrics global is a leading payment service provider providing unified payment services in the US.\n\\* amazon_payments -\n\nAmazon Payments is a payment service provider.\n\\* windcave -\n\nWindcave provides an end to end payment processing solution in ANZ and other leading global markets.\n\\* quickbooks -\n\nIntuit QuickBooks Payments gateway\n\\* wepay -\n\nWePay is a payment gateway.\n\\* ezidebit -\n\nEzidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \nThis feature is a **Private Beta Release**.\n\\* wirecard -\n\nWireCard Account is a payment service provider.\n\\* chargebee_payments -\n\nChargebee Payments gateway\n\\* sage_pay -\n\nSage Pay is a payment gateway.\n\\* elavon -\n\nElavon Virtual Merchant is a payment solution.\n\\* paypal_pro -\n\nPayPal Pro Account is a payment gateway.\n\\* orbital -\n\nChase Paymentech(Orbital) is a payment gateway.\n\\* paypal -\n\nPayPal Commerce is a payment gateway.\n\\* beanstream -\n\nBambora(formerly known as Beanstream) is a payment gateway.\n\\* hdfc -\n\nHDFC Account is a payment gateway.\n\\* ingenico_direct -\n\nWorldline Online Payments is a payment gateway.\n\\* ogone -\n\nIngenico ePayments (formerly known as Ogone) is a payment gateway.\n\\* migs -\n\nMasterCard Internet Gateway Service payment gateway.\n\\* vantiv -\n\nVantiv is a payment gateway.\n\\* bank_of_america -\n\nBank of America Gateway\n\\* eway_rapid -\n\neWAY Rapid is a payment gateway.\n\\* gocardless -\n\nGoCardless is a payment service provider.\n\\* mollie -\n\nMollie is a payment gateway.\n\\* paymill -\n\nPAYMILL is a payment gateway.\n\\* balanced_payments -\n\nBalanced is a payment gateway\n\\* solidgate -\n\nSolidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release**.\n\\* ebanx -\n\nEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account this payment method is stored with.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier provided by the gateway to reference that specific card.\n", "maxLength" : 100, "example" : null } }, "required" : [ "gateway", "reference_id", "type" ], "example" : null }, "ThunkingPlan" : { "type" : "object", "description" : "This resource is used to return thunking plan.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The identifier for the item price. It is unique and immutable.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "

A unique display name for the item price in the Chargebee UI. If external_name\nis not provided, this is also used in customer-facing pages and documents such as invoices\nand hosted pages\n.

", "maxLength" : 100, "example" : null }, "item_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the item that the item price belongs to.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the item price.\n", "maxLength" : 2000, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of the item price.

\n* 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.

\n* active -

The item price can be used in subscriptions.

\n* deleted -

Indicates that the item price has been deleted. The id\nand name\ncan be reused.

", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "

The name of the item price used in customer-facing pages and documents. These include invoices\nand hosted pages.\nIf not provided, then name\nis used

", "maxLength" : 100, "example" : null }, "price_variant_id" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "proration_type" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "site_default", "partial_term", "full_term" ], "example" : null }, "pricing_model" : { "type" : "string", "default" : "flat_fee", "deprecated" : false, "description" : "

The pricing scheme for this item price. If subscriptions, invoices or differential prices exist for this item price, pricing_model cannot be changed.

\n* tiered -

There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.

\n* per_unit -

A fixed price per unit quantity.

\n* flat_fee -

A fixed price that is not quantity-based.

\n* volume -

The per unit price is based on the tier that the total quantity falls in.

\n* 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" ], "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The cost of the item price when the pricing model is flat_fee.\nWhen the pricing model is per_unit\n, 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\n.

", "minimum" : 0, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The price of the item when the pricing_model is flat_fee.\nWhen the pricing model is per_unit\n, 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\nis enabled.

", "maxLength" : 39, "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "\n

If subscriptions or invoices exist for this item price, period\ncannot be changed. The period\nis mandatory when the item type\nis plan\nor addon

", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for period.\nIf subscriptions or invoices exist for this item price, period_unit\ncannot be changed. The period_unit\nis mandatory when the item type\nis plan\nor addon

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

\n* week -

A period of 7 days.

\n* year -

A period of 1 calendar year.

", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "trial_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The trial period of the plan in trial_period_unit\ns. You can also set trial periods for addons\n; contact Support\nto enable that feature.

", "minimum" : 0, "example" : null }, "trial_period_unit" : { "type" : "string", "deprecated" : false, "description" : "

The unit of time for trial_period\n.

\n* month -

A period of 1 calendar month.

\n* day -

A period of 24 hours.

", "enum" : [ "day", "month" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "

Applicable only when End-of-trial Action\nhas been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the item.type\nis plan\nand a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the subscription-level\n.

\n* cancel_subscription -

The subscription cancels.

\n* activate_subscription -

The subscription activates and charges are raised for non-metered items.

\n* site_default -

The action configured for the site\nat the time when the trial ends, takes effect.

", "enum" : [ "site_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "shipping_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Defines the shipping frequency. Example: to bill customer every 2 weeks, provide \"2\" here.\n", "minimum" : 1, "example" : null }, "shipping_period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines the shipping frequency in association with shipping period.\n\\* year -\n\nA period of 1 calendar year.\n\\* day -\n\nA period of 24 hours.\n\\* week -\n\nA period of 7 days.\n\\* month -\n\nA period of 1 calendar month.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

The default number of billing cycles a subscription to the plan must run. Can be overridden for a subscription.\nAddons can also have billing cycles. However, you must contact Support to enable that. Also, for addons, you can override this while attaching it to a plan. However, if you provide the value while applying the addon to a subscription, then that value takes still higher precedence.\nIf subscriptions, invoices or differential prices\nexist for this item price, billing_cycles\ncannot be changed.

", "minimum" : 1, "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "

Free quantity the subscriptions of this plan item_price will have. Only the quantity exceeding this value will be charged in the subscription.

\n

Note:

", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/getting-started)\nis enabled.\n", "maxLength" : 33, "example" : null }, "channel" : { "type" : "string", "deprecated" : false, "description" : "The subscription channel this object originated from and is maintained in.\n\\* web -\n\nThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n\\* app_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n\\* play_store -\n\nThe object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions)\ncreated in Google Play Store. Direct manipulation of this object via UI or API is disallowed.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this item price was last updated\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this item price was created\n", "example" : null }, "usage_accumulation_reset_frequency" : { "type" : "string", "deprecated" : false, "description" : "null\n", "enum" : [ "never", "subscription_billing_frequency" ], "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The type of the item.\n\\* plan -\n\nAn 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.\n\\* charge -\n\nA 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](/docs/api/v2/pcv-1/invoices/create-invoice-for-a-one-time-charge)\nwithout being applied to a subscription.\n\\* addon -\n\nA recurring component that can be added to a subscription in addition to its plan.\n", "enum" : [ "plan", "addon", "charge" ], "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "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.\n", "example" : null }, "giftable" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Specifies if gift subscriptions can be created for this item.\n", "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "

If enabled_for_checkout\n, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.

", "maxLength" : 500, "example" : null }, "enabled_for_checkout" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Allow the plan to subscribed to via Checkout. Applies only for plan-items.\n**Note:**\nOnly the in-app layout of Checkout is supported.\n", "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : true, "deprecated" : 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).\nApplies 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)\n.\n", "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "

The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge\nand 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\n.

", "example" : null }, "item_applicability" : { "type" : "string", "default" : "all", "deprecated" : false, "description" : "

Indicates which addon-items and charge-items can be applied to the item. Only meant 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\nor Update an attached item\nAPI.

\n* all -

all addon-items and charge-items are applicable to this plan-item.

\n* restricted -

only the addon-items or charge-items provided in applicable_items\ncan be applied to this plan-item.

", "enum" : [ "all", "restricted" ], "example" : null }, "gift_claim_redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The URL to redirect to once the gift has been claimed by the receiver.\n", "maxLength" : 500, "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "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](/docs/api/hosted_pages)\n, [invoices](/docs/api/invoices)\nand [quotes](/docs/api/quotes).\nExamples follow:\n\n* \"user\" for a cloud-collaboration platform.\n* \"GB\" for a data service.\n* \"issue\" for a magazine.\n", "maxLength" : 30, "example" : null }, "item_name" : { "type" : "string", "deprecated" : false, "description" : "Name of the items.\n", "maxLength" : 50, "example" : null }, "item_description" : { "type" : "string", "deprecated" : false, "description" : "Description of the item. This is visible only in Chargebee and not to customers.\n", "maxLength" : 500, "example" : null }, "item_updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the item was last updated.\n", "example" : null }, "applicable_item_id" : { "type" : "string", "deprecated" : false, "description" : "Id of the addon-item or plan-item that can be applied to the plan-item.\n", "maxLength" : 100, "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "description" : "This maps to the sku or product name in the accounting integration.\n", "maxLength" : 100, "example" : null }, "accounting_code" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the chart of accounts under which the item price falls in the accounting system.\n", "maxLength" : 100, "example" : null }, "accounting_category1" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n\n", "maxLength" : 100, "example" : null }, "accounting_category2" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n\n", "maxLength" : 100, "example" : null }, "accounting_category3" : { "type" : "string", "deprecated" : false, "description" : "

Used exclusively with the following accounting integrations

\n", "maxLength" : 100, "example" : null }, "accounting_category4" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**NetSuite:**](https://www.chargebee.com/docs/2.0/netsuite.html ) Provide the \"Revenue Recognition Rule Id\" for the product from NetSuite.\n* [**Intacct:**](https://www.chargebee.com/docs/2.0/intacct.html ) If you have configured \"Revenue Recognition Templates\" for products in Intacct, provide the template ID for the product.\n", "maxLength" : 100, "example" : null }, "tax_profile_id" : { "type" : "string", "deprecated" : false, "description" : "The tax profile of the item price.\n", "maxLength" : 50, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the [Avalara sale type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n\\* retail -\n\nTransaction is a sale to an end user\n\\* vendor_use -\n\nTransaction is for an item that is subject to vendor use tax\n\\* consumed -\n\nTransaction is for an item that is consumed directly\n\\* wholesale -\n\nTransaction is a sale to another company that will resell your product or service to another consumer\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the [Avalara transaction type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the [Avalara service type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem)\nfor the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html)\n.\n", "example" : null }, "avalara_tax_code" : { "type" : "string", "deprecated" : false, "description" : "The [Avalara tax codes](https://taxcode.avatax.avalara.com)\nfor the item price. Applicable only if you use [AvaTax for Sales integration](https://www.chargebee.com/docs/2.0/avatax-for-sales.html)\n.\n", "maxLength" : 50, "example" : null }, "hsn_code" : { "type" : "string", "deprecated" : false, "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**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.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "maxLength" : 50, "example" : null }, "taxjar_product_code" : { "type" : "string", "deprecated" : false, "description" : "The [TaxJar product code](https://developers.taxjar.com/api/reference/#get-list-tax-categories)\nfor the item price. Applicable only if you use [TaxJar integration](https://www.chargebee.com/docs/2.0/taxjar.html)\n.\n", "maxLength" : 50, "example" : null }, "setup_cost" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "One-time setup fee charged as part of the first invoice.\n", "minimum" : 1, "example" : null }, "addon_applicability" : { "type" : "string", "default" : "all", "deprecated" : false, "description" : "Indicates if all or only some addons are applicable with the plan.\n\\* all -\n\nAll addons are applicable with this plan.\n\\* restricted -\n\nOnly addons marked as 'applicable_addons' are applicable with the plan.\n", "enum" : [ "all", "restricted" ], "example" : null }, "charge_type" : { "type" : "string", "default" : "recurring", "deprecated" : false, "description" : "Type of charge\n\\* non_recurring -\n\nCharged immediately and only once every time it is applied.\n\\* recurring -\n\nCharges are automatically applied in sync with the billing frequency of subscription.\n", "enum" : [ "recurring", "non_recurring" ], "example" : null }, "item_model" : { "type" : "boolean", "deprecated" : false, "description" : "If enabled indicates that the particular site is on new Item model, else on old model\n", "example" : null } }, "required" : [ "addon_applicability", "charge_type", "created_at", "enabled_for_checkout", "enabled_in_portal", "free_quantity", "giftable", "id", "item_model", "item_name", "name", "pricing_model", "type" ], "example" : null }, "TimeMachine" : { "type" : "object", "description" : "Time Machine is a simulation feature which imitates the key characteristics, behaviours and functions of the billing configurations. It is a virtual time travelling tool which facilitates the integration testing process by carrying out subscription renewals, dunning, webhooks etc on a hypothetical time frame.\n\nYou can use Time Machine in the test site to verify if the billing rules configured in your site adhere to your expectations before executing them in real time. This feature can be used in both API and UI versions.\n\nView this [doc](https://www.chargebee.com/docs/time-machine.html) for more details.\n\n**Note:** In order to use Time Machine via API , you need to first \"enable\" the Time Travel option which is available under **Settings** \\> **Configure Chargebee** \\> **Time Machine**.\n", "properties" : { "name" : { "type" : "string", "default" : "delorean", "deprecated" : false, "description" : "The name of the time machine. Currently only **delorean**\nis allowed\n", "maxLength" : 50, "example" : null }, "time_travel_status" : { "type" : "string", "default" : "not_enabled", "deprecated" : false, "description" : "The current status of time travel\n\\* succeeded -\n\nTime travel has succeeded.\n\\* not_enabled -\n\nTime travel has not been enabled for the site\n\\* failed -\n\nTime travel has failed. Check the failure code and failure reason attributes for further details.\n**Note:**\nThe time machine needs to be reset by starting afresh again.\n\\* in_progress -\n\nTime travel is in progress\n", "enum" : [ "not_enabled", "in_progress", "succeeded", "failed" ], "example" : null }, "genesis_time" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start time of the time machine. Specified when 'starting afresh'\n", "example" : null }, "destination_time" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The destination time to which the time machine is travelling (or has traveled)\n", "example" : null }, "failure_code" : { "type" : "string", "deprecated" : false, "description" : "The failure code. This will follow the api error code convention\n", "maxLength" : 250, "example" : null }, "failure_reason" : { "type" : "string", "deprecated" : false, "description" : "The more descriptive failure reason.\n", "maxLength" : 250, "example" : null }, "error_json" : { "type" : "string", "deprecated" : false, "description" : "The failure details as error json.\n", "maxLength" : 1000, "example" : null } }, "required" : [ "destination_time", "genesis_time", "name", "time_travel_status" ], "example" : null }, "Token" : { "type" : "object", "description" : "Tokenization hides sensitive payment information into a unique token for a secure transaction. The token does not expose any actual payment details.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the Chargebee Token\n", "maxLength" : 40, "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "Name of the gateway this token is stored in.\n\\* twikey -\n\nTwikey is a payment service provider that specializes in processing direct debit payments across the EU.\n\\* bluesnap -\n\nBlueSnap is a payment gateway.\n\\* tco -\n\n2Checkout is a payment gateway.\n\\* first_data_global -\n\nFirst Data Global Gateway Virtual Terminal Account\n\\* exact -\n\nExact Payments is a payment gateway.\n\\* bluepay -\n\nBluePay is a payment gateway.\n\\* paypal_express_checkout -\n\nPayPal Express Checkout is a payment gateway.\n\\* eway -\n\neWAY Account is a payment gateway.\n\\* paypal_payflow_pro -\n\nPayPal Payflow Pro is a payment gateway.\n\\* razorpay -\n\nRazorpay 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.\n\\* global_payments -\n\nGlobal Payments is a payment service provider.\n\\* amazon_payments -\n\nAmazon Payments is a payment service provider.\n\\* not_applicable -\n\nIndicates that payment gateway is not applicable for this resource.\n\\* checkout_com -\n\nCheckout.com is a payment gateway.\n\\* adyen -\n\nAdyen is a payment gateway.\n\\* braintree -\n\nBraintree is a payment gateway.\n\\* nmi -\n\nNMI is a payment gateway.\n\\* quickbooks -\n\nIntuit QuickBooks Payments gateway\n\\* wepay -\n\nWePay is a payment gateway.\n\\* worldpay -\n\nWorldPay is a payment gateway\n\\* wirecard -\n\nWireCard Account is a payment service provider.\n\\* chargebee_payments -\n\nChargebee Payments gateway\n\\* sage_pay -\n\nSage Pay is a payment gateway.\n\\* moneris_us -\n\nMoneris USA is a payment gateway.\n\\* pin -\n\nPin is a payment gateway\n\\* authorize_net -\n\nAuthorize.net is a payment gateway\n\\* elavon -\n\nElavon Virtual Merchant is a payment solution.\n\\* paypal_pro -\n\nPayPal Pro Account is a payment gateway.\n\\* orbital -\n\nChase Paymentech(Orbital) is a payment gateway.\n\\* paypal -\n\nPayPal Commerce is a payment gateway.\n\\* beanstream -\n\nBambora(formerly known as Beanstream) is a payment gateway.\n\\* hdfc -\n\nHDFC Account is a payment gateway.\n\\* ingenico_direct -\n\nWorldline Online Payments is a payment gateway.\n\\* ogone -\n\nIngenico ePayments (formerly known as Ogone) is a payment gateway.\n\\* migs -\n\nMasterCard Internet Gateway Service payment gateway.\n\\* stripe -\n\nStripe is a payment gateway.\n\\* vantiv -\n\nVantiv is a payment gateway.\n\\* moneris -\n\nMoneris is a payment gateway.\n\\* chargebee -\n\nChargebee test gateway.\n\\* eway_rapid -\n\neWAY Rapid is a payment gateway.\n\\* gocardless -\n\nGoCardless is a payment service provider.\n\\* mollie -\n\nMollie is a payment gateway.\n\\* paymill -\n\nPAYMILL is a payment gateway.\n\\* balanced_payments -\n\nBalanced is a payment gateway\n\\* cybersource -\n\nCyberSource is a payment gateway.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this token is stored.\n", "maxLength" : 50, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "Type of payment method of the token.\n\\* google_pay -\n\nPayments made via Google Pay.\n\\* pay_co -\n\nPayments made via PayCo\n\\* tamara -\n\nPayments made via Tamara.\n\\* alipay_hk -\n\nPayments made via Alipay HK.\n\\* apple_pay -\n\nPayments made via Apple Pay.\n\\* unionpay -\n\nPayments made via UnionPay.\n\\* ideal -\n\nPayments made via iDEAL.\n\\* bancontact -\n\nPayments made via Bancontact Card.\n\\* netbanking_emandates -\n\nNetbanking (eMandates) Payments.\n\\* trustly -\n\nTrustly\n\\* after_pay -\n\nPayments made via Afterpay\n\\* alipay -\n\nPayments made via Alipay. \nThis payment source is deprecated.\n\\* dotpay -\n\nPayments made via Dotpay.\n\\* giropay -\n\nPayments made via giropay.\n\\* sofort -\n\nPayments made via Sofort.\n\\* gcash -\n\nPayments made via GCash.\n\\* direct_debit -\n\nRepresents bank account for which the direct debit or ACH agreement/mandate is created.\n\\* dana -\n\nPayments made via Dana.\n\\* paypal_express_checkout -\n\nPayments made via PayPal Express Checkout.\n\\* touch_n_go -\n\nPayments made via Touch 'n Go.\n\\* qpay -\n\nPayments made via Qpay.\n\\* amazon_payments -\n\nPayments made via Amazon Payments.\n\\* electronic_payment_standard -\n\nElectronic Payment Standard\n\\* grab_pay -\n\nPayments made via GrabPay\n\\* card -\n\nCard based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n\\* upi -\n\nUPI Payments.\n\\* pay_by_bank -\n\nPay By Bank\n\\* go_pay -\n\nPayments made via GoPay\n\\* swish -\n\nPayments made via Swish\n\\* twint -\n\nPayments made via Twint\n\\* generic -\n\nPayments made via Generic Payment Method.\n\\* payme -\n\nPayments made via PayMe\n\\* wechat_pay -\n\nPayments made via WeChat Pay. \nThis payment source is deprecated.\n\\* kbc_payment_button -\n\nKBC Payment Button\n", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "status" : { "type" : "string", "default" : "new", "deprecated" : false, "description" : "Status of the token\n\\* new -\n\nnew\n\\* consumed -\n\nThe token is already used\n\\* expired -\n\nexpired\n", "enum" : [ "new", "expired", "consumed" ], "example" : null }, "id_at_vault" : { "type" : "string", "deprecated" : false, "description" : "The id with which this token is referred in gateway\n", "maxLength" : 65000, "example" : null }, "vault" : { "type" : "string", "deprecated" : false, "description" : "Name of the gateway/vault provider where the payment method is tokenized\n\\* gateway -\n\ngateway\n\\* spreedly -\n\nspreedly\n", "enum" : [ "spreedly", "gateway" ], "example" : null }, "ip_address" : { "type" : "string", "deprecated" : false, "description" : "The IP address from where the token is created. Used primarily for EU VAT validation.\n", "maxLength" : 50, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this token resource was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this token resource is created.\n", "example" : null }, "expired_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this token is expired\n", "example" : null } }, "required" : [ "created_at", "gateway", "gateway_account_id", "id", "id_at_vault", "payment_method_type", "status", "vault" ], "example" : null }, "TokenConsumedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token" } }, "required" : [ "token" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "TokenCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token" } }, "required" : [ "token" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "TokenExpiredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token" } }, "required" : [ "token" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "Transaction" : { "type" : "object", "description" : "This resource represents the [transaction](https://www.chargebee.com/docs/transactions.html)\nevent that has happened in your account.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the transaction.\n", "maxLength" : 40, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for which this transaction is made\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this transaction is made.\n", "maxLength" : 50, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for this transaction\n", "maxLength" : 50, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the payment source for which this transaction is made\n", "maxLength" : 40, "example" : null }, "payment_method" : { "type" : "string", "default" : "card", "deprecated" : false, "description" : "

The payment method of this transaction

\n* naver_pay -

Payments made via Naver Pay.

\n\n* qpay -

Payments made via Qpay.

\n\n* unionpay -

Unionpay

\n* paypay -

PayPay

\n* online_banking_poland -

Online Banking Poland

\n\n* upi -

upi

\n* payconiq_by_bancontact -

Payments made via Payconiq by Bancontact.

\n\n* kakao_pay -

Payments made via Kakao Pay.

\n\n* check -

Check

\n* payme -

Payments made via PayMe

\n\n* cash_app_pay -

Payments made via Cash App Pay.

\n\n* custom -

Custom

\n* amazon_payments -

Amazon Payments

\n* boleto -

boleto

\n* klarna -

Payments made via Klarna.

\n\n* direct_debit -

Direct Debit

\n* klarna_pay_now -

Klarna Pay Now

\n\n* sepa_instant_transfer -

Sepa Instant Transfer

\n\n* apple_pay -

Apple Pay

\n* wechat_pay -

Payments made via WeChat Pay.

\n\n* twint -

Payments made via Twint

\n\n* kbc_payment_button -

KBC Payment Button

\n* bancontact -

Bancontact

\n* faster_payments -

Faster Payments

\n\n* go_pay -

Payments made via GoPay

\n\n* stablecoin -

Payments made via Stablecoin.

\n\n* venmo -

Venmo

\n\n* touch_n_go -

Payments made via Touch 'n Go.

\n\n* bank_transfer -

Bank Transfer

\n* paypal_express_checkout -

Paypal Express Checkout

\n* electronic_payment_standard -

Electronic Payment Standard

\n* other -

Payment Methods other than the above types

\n* tamara -

Payments made via Tamara.

\n\n* trustly -

Trustly

\n* ach_credit -

ACH Credit

\n* sepa_credit -

SEPA Credit

\n* alipay_hk -

Payments made via Alipay HK.

\n\n* card -

Card

\n* gcash -

Payments made via GCash.

\n\n* ideal -

IDEAL

\n* chargeback -

Only applicable for a transaction of type\n= refund.\nThis value is set by Chargebee when an automated chargeback\noccurs. You can also set this explicitly when recording a refund\n.

\n* automated_bank_transfer -

Automated Bank Transfer

\n\n* google_pay -

Google Pay

\n* dana -

Payments made via Dana.

\n\n* netbanking_emandates -

netbanking_emandates

\n* pay_to -

PayTo

\n\n* pay_by_bank -

Pay By Bank

\n* dotpay -

Dotpay

\n* alipay -

Payments made via Alipay.

\n\n* sofort -

Sofort

\n* swish -

Payments made via Swish

\n\n* grab_pay -

Payments made via GrabPay

\n\n* pix -

Pix

\n\n* giropay -

giropay

\n* pay_co -

Payments made via PayCo

\n\n* revolut_pay -

Payments made via Revolut Pay.

\n\n* cash -

Cash

\n* after_pay -

Payments made via Afterpay

\n\n* south_korean_cards -

Payments made via South Korean Cards

", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "

The reference number for this transaction. For example, the check number when payment_method\n= check\n.

", "maxLength" : 100, "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "Gateway through which this transaction was done. Applicable only for 'Card' Payment Method\n\\* bluesnap -\n\nBlueSnap is a payment gateway.\n\\* jp_morgan -\n\nJ.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different [payment_source_type](/docs/api/payment_sources/payment_source-object#type). \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/jp-morgan-bacs&ref=feature) to enable the J.P. Morgan Mobility Payment Solutions gateway via payFURL for your test and live sites.\n\\* tco -\n\n2Checkout is a payment gateway.\n\\* payway -\n\nPayway is a payment gateway that enables secure card and payment acceptance.\n\\* razorpay -\n\nRazorpay 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.\n\\* dlocal -\n\nDlocal provides payment solutions for global commerce by accepting local payment methods.\n\\* checkout_com -\n\nCheckout.com is a payment gateway.\n\\* adyen -\n\nAdyen is a payment gateway.\n\\* braintree -\n\nBraintree is a payment gateway.\n\\* paystack -\n\nPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/paystack&ref=feature) to enable Paystack for your test and live sites.\n\\* pay_com -\n\nPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n\\* moneris_us -\n\nMoneris USA is a payment gateway.\n\\* pin -\n\nPin is a payment gateway\n\\* moneris -\n\nMoneris is a payment gateway.\n\\* chargebee -\n\nChargebee test gateway.\n\\* cybersource -\n\nCyberSource is a payment gateway.\n\\* ecentric -\n\nEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n\\* first_data_global -\n\nFirst Data Global Gateway Virtual Terminal Account\n\\* exact -\n\nExact Payments is a payment gateway.\n\\* nuvei -\n\nNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/nuvei&ref=feature) to enable Nuvei for your test and live sites.\n\\* eway -\n\neWAY Account is a payment gateway.\n\\* amazon_payments -\n\nAmazon Payments is a payment service provider.\n\\* sage_pay -\n\nSage Pay is a payment gateway.\n\\* elavon -\n\nElavon Virtual Merchant is a payment solution.\n\\* orbital -\n\nChase Paymentech(Orbital) is a payment gateway.\n\\* beanstream -\n\nBambora(formerly known as Beanstream) is a payment gateway.\n\\* hdfc -\n\nHDFC Account is a payment gateway.\n\\* bank_of_america -\n\nBank of America Gateway\n\\* gocardless -\n\nGoCardless is a payment service provider.\n\\* paymill -\n\nPAYMILL is a payment gateway.\n\\* balanced_payments -\n\nBalanced is a payment gateway\n\\* twikey -\n\nTwikey is a payment service provider that specializes in processing direct debit payments across the EU.\n\\* moyasar -\n\nMoyasar is a fully integrated online payment service that makes accepting payments simple and secure.\n\\* deutsche_bank -\n\nDeutsche Bank is the leading German bank with strong European roots and a global network. \nThis feature is a **Private Beta Release**.\n\\* bluepay -\n\nBluePay is a payment gateway.\n\\* paypal_express_checkout -\n\nPayPal Express Checkout is a payment gateway.\n\\* paypal_payflow_pro -\n\nPayPal Payflow Pro is a payment gateway.\n\\* global_payments -\n\nGlobal Payments is a payment service provider.\n\\* not_applicable -\n\nIndicates that payment gateway is not applicable for this resource.\n\\* nmi -\n\nNMI is a payment gateway.\n\\* worldpay -\n\nWorldPay is a payment gateway\n\\* authorize_net -\n\nAuthorize.net is a payment gateway\n\\* tempus -\n\nTempus Technologies is a payment gateway and payments technology provider offering secure payment processing with point-to-point encryption (P2PE) and tokenization.\n\\* stripe -\n\nStripe is a payment gateway.\n\\* metrics_global -\n\nMetrics global is a leading payment service provider providing unified payment services in the US.\n\\* windcave -\n\nWindcave provides an end to end payment processing solution in ANZ and other leading global markets.\n\\* quickbooks -\n\nIntuit QuickBooks Payments gateway\n\\* wepay -\n\nWePay is a payment gateway.\n\\* ezidebit -\n\nEzidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \nThis feature is a **Private Beta Release**.\n\\* wirecard -\n\nWireCard Account is a payment service provider.\n\\* chargebee_payments -\n\nChargebee Payments gateway\n\\* paypal_pro -\n\nPayPal Pro Account is a payment gateway.\n\\* paypal -\n\nPayPal Commerce is a payment gateway.\n\\* ingenico_direct -\n\nWorldline Online Payments is a payment gateway.\n\\* ogone -\n\nIngenico ePayments (formerly known as Ogone) is a payment gateway.\n\\* migs -\n\nMasterCard Internet Gateway Service payment gateway.\n\\* vantiv -\n\nVantiv is a payment gateway.\n\\* eway_rapid -\n\neWAY Rapid is a payment gateway.\n\\* mollie -\n\nMollie is a payment gateway.\n\\* solidgate -\n\nSolidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release**.\n\\* ebanx -\n\nEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "

Type of the transaction.

\n* authorization -

The transaction represents an authorization for capturing the amount\nfrom the customer's payment_source\n.

\n* payment -

The transaction represents capture of amount\nfrom the customer's payment_source\n.

\n* refund -

The transaction represents a refund of amount\nto the customer's payment_source\n.

\n* payment_reversal -

Indicates a reversal transaction.

", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null }, "settled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the time at which the final status of the transaction has been marked.\n", "example" : null }, "exchange_rate" : { "type" : "number", "format" : "decimal", "deprecated" : false, "description" : "Exchange rate used for base currency conversion\n", "maximum" : 1000000000, "minimum" : 0.0000000010, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the transaction.\n", "maxLength" : 3, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount for this transaction.\n", "minimum" : 0, "example" : null }, "id_at_gateway" : { "type" : "string", "deprecated" : false, "description" : "The id with which this transaction is referred in gateway.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of this transaction.

\n* in_progress -

Transaction is being processed by the gateway. This typically happens for direct debit transactions\nor, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.

\n* timeout -

Transaction failed because of Gateway not accepting the connection.

\n* success -

The transaction is successful.

\n* voided -

The transaction got voided or authorization expired at gateway.

\n* needs_attention -

When connection with the Gateway gets terminated abruptly. For needs_attention\nstatus Chargebee automatically reconcile the transaction for few gateways, for rest of the gateways you have to use the Reconcile transaction API.\nYou can use this API to update the id_at_gateway\n(Gateway Transaction ID) and status\nfor a needs_attention\ntransaction to be reconciled at par with the gateway.

\n

Learn more\nabout needs_attention\ntransaction status

\n* late_failure -

Indicates that a successful payment transaction has failed now due to a late failure notification from the payment gateway, typically caused by issues like insufficient funds or a closed bank account.

\n* failure -

Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure

", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "fraud_flag" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether or not the transaction has been [identified as fraudulent](https://www.chargebee.com/docs/payments/2.0/fraud-management/chargebee-fraud-management).\n\\* suspicious -\n\nThe transaction has been identified as potentially fraudulent by the gateway\n\\* safe -\n\nThe transaction has been marked as safe\n\\* fraudulent -\n\nThe transaction has been marked as fraudulent\n", "enum" : [ "safe", "suspicious", "fraudulent" ], "example" : null }, "initiator_type" : { "type" : "string", "deprecated" : false, "description" : "Marker for on-session payments (3DS). null indicates 'merchant'.\n\\* merchant -\n\nPayment initiated on stored payment method by the merchant\n\\* customer -\n\nCustomer initiated 3DS payment\n", "enum" : [ "customer", "merchant" ], "example" : null }, "three_d_secure" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether this transaction has gone through 3DS. Applicable only for 'on-session' payments \\& verifications.If 3DS is not enforced by the gateway/bank or if the customers' card is not enrolled, this will be false.\n", "example" : null }, "authorization_reason" : { "type" : "string", "deprecated" : false, "description" : "

Type of authorization transaction.

\n* scheduled_capture -

The transaction was authorized in advance for capture at a later time by a scheduled system job. The capture may succeed or fail, and its outcome is recorded as a linked transaction under linked_payments\n.

\n* verification -

The transaction has been created for payment method verification.

\n* blocking_funds -

The transaction has been created to block the funds from payment method.

", "enum" : [ "blocking_funds", "verification", "scheduled_capture" ], "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "Error code received from the payment gateway on failure.\n", "maxLength" : 100, "example" : null }, "error_text" : { "type" : "string", "deprecated" : false, "description" : "Error message received from the payment gateway on failure.\n", "maxLength" : 65000, "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the payment was voided or authorization expired at gateway.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this transaction was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.\n", "example" : null }, "fraud_reason" : { "type" : "string", "deprecated" : false, "description" : "Short description why the transaction was marked as fraud/suspicious\n", "maxLength" : 250, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null }, "amount_unused" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

This is the part of the amount\nwhich has not been invoiced yet and is therefore added to excess_payments\nfor the customer. Applicable only for a transaction of type\n= payment\n.

", "minimum" : 0, "example" : null }, "masked_card_number" : { "type" : "string", "deprecated" : false, "description" : "The masked card number used for this transaction. Applicable only for 'Card' Payment Method\n", "maxLength" : 20, "example" : null }, "reference_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "

This is the id\nof the offline transaction that is being refunded or reversed. Applicable only for transaction of type\n= refund\nor payment_reversal\n.

", "maxLength" : 40, "example" : null }, "refunded_txn_id" : { "type" : "string", "deprecated" : false, "description" : "

This is the id\nof the transaction (always of type\n= payment\n) being refunded. Applicable only for transaction of type\n= refund\n.

", "maxLength" : 40, "example" : null }, "reference_authorization_id" : { "type" : "string", "deprecated" : false, "description" : "

This is the id\nof the transaction (always of type\n= authorization\n) which authorizes the payment being captured. Applicable only for transaction of type\n= payment\n.

", "maxLength" : 40, "example" : null }, "amount_capturable" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

This is the part of the authorized amount\nthat is yet to be captured. The payment capture is recorded as a transaction of of type\n= payment.\nApplicable only for a transaction of type\n= authorization\n.

", "minimum" : 0, "example" : null }, "reversal_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "Reversal transaction id. Applicable only for payment transactions.\n", "maxLength" : 40, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates that this resource has been deleted.\n", "example" : null }, "iin" : { "type" : "string", "deprecated" : false, "description" : "First 6 digits of the card payment method.\n", "maxLength" : 6, "minLength" : 4, "example" : null }, "last4" : { "type" : "string", "deprecated" : false, "description" : "Last 4 digits of the card payment method.\n", "maxLength" : 4, "minLength" : 4, "example" : null }, "merchant_reference_id" : { "type" : "string", "deprecated" : false, "description" : "A unique id used to track this transaction across various systems you integrate with. This id is passed to the payment gateway when the transaction is initiated. Supported only for the [Exact payment gateway](https://www.chargebee.com/docs/exact-direct.html)\n.\n", "maxLength" : 500, "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "

The unique ID of the business entity\nof this transaction.\nThis is always the same as the business entity of the customer.

\n", "maxLength" : 50, "example" : null }, "payment_method_details" : { "type" : "string", "deprecated" : false, "description" : "Payment method details of the corresponding transaction\n", "example" : null }, "custom_payment_method_name" : { "type" : "string", "deprecated" : false, "description" : "Name of the custom payment method of this transaction.\n", "maxLength" : 100, "example" : null }, "linked_invoices" : { "type" : "array", "deprecated" : false, "description" : "Applicable only for 'Payment' transactions. The list of invoices this 'payment' transaction is applied to.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for the invoice.\n", "maxLength" : 50, "example" : null }, "applied_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The transaction amount applied to this invoice\n", "minimum" : 0, "example" : null }, "applied_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which the transaction is applied.\n", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date this invoice is issued.\n", "example" : null }, "invoice_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of the invoice\n", "minimum" : 0, "example" : null }, "invoice_status" : { "type" : "string", "deprecated" : false, "description" : "

Current status of this invoice.

\n* pending -

The invoice 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_invoicesattribute is set to true.\nThe invoice is yet to be closed (sent for payment collection). All invoices are generated with this status when Metered Billing is enabled for the site.

\n* voided -

Indicates a voided invoice.

\n* payment_due -

Indicates the payment is not yet collected and is being retried as per retry settings.

\n* paid -

Indicates a paid invoice.

\n* posted -

Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period

\n* not_paid -

Indicates the payment is not made and all attempts to collect is failed.

", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null } }, "required" : [ "applied_amount", "applied_at", "invoice_id", "invoice_status" ], "example" : null }, "example" : null }, "linked_credit_notes" : { "type" : "array", "deprecated" : false, "description" : "Applicable only for 'Refund' transactions. The list of Credit Notes this 'refund' transaction is associated with.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "cn_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for the credit-notes.\n", "maxLength" : 50, "example" : null }, "applied_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The transaction amount applied to this invoice\n", "minimum" : 0, "example" : null }, "applied_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp at which the transaction is applied.\n", "example" : null }, "cn_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Credit note reason code. Deprecated use the cn_create_reason_code parameter instead\n\\* service_unsatisfactory -\n\nService Unsatisfactory\n\\* other -\n\nCan be set when none of the above reason codes are applicable\n\\* subscription_cancellation -\n\nThis reason will be set automatically for Credit Notes created during cancel subscription operation\n\\* fraudulent -\n\nFRAUDULENT\n\\* order_change -\n\nOrder Change\n\\* subscription_pause -\n\nThis reason will be automatically set to credit notes created during pause/resume subscription operation.\n\\* write_off -\n\nThis reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off)\noperation.\n\\* subscription_change -\n\nThis reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html)\nis enabled\n\\* chargeback -\n\nCan be set when you are recording your customer Chargebacks\n\\* waiver -\n\nWaiver\n\\* order_cancellation -\n\nOrder Cancellation\n\\* product_unsatisfactory -\n\nProduct Unsatisfactory\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "cn_create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Credit note reason code\n", "maxLength" : 100, "example" : null }, "cn_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date this credit note is created.\n", "example" : null }, "cn_total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Total amount of the credit note\n", "minimum" : 0, "example" : null }, "cn_status" : { "type" : "string", "deprecated" : false, "description" : "The status of this Credit Note.\n\\* voided -\n\nWhen the Credit Note has been cancelled.\n\\* refund_due -\n\nWhen the credits are yet to be used, or have been partially used.\n\\* refunded -\n\nWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n\\* adjusted -\n\nWhen the Credit Note has been adjusted against an invoice.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "cn_reference_invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The invoice number. Acts as a identifier for invoice and typically generated sequentially.\n", "maxLength" : 50, "example" : null } }, "required" : [ "applied_amount", "applied_at", "cn_id", "cn_status" ], "example" : null }, "example" : null }, "linked_refunds" : { "type" : "array", "deprecated" : false, "description" : "Applicable only for Payment transactions. It only returns values when the transaction is not associated with an invoice, and that there is a refund for the transaction.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "txn_id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the transaction.\n", "maxLength" : 40, "example" : null }, "txn_status" : { "type" : "string", "deprecated" : false, "description" : "

The status of this transaction.

\n* needs_attention -

When connection with the Gateway gets terminated abruptly. For needs_attention\nstatus Chargebee automatically reconcile the transaction for few gateways, for rest of the gateways you have to use the Reconcile transaction API.\nYou can use this API to update the id_at_gateway\n(Gateway Transaction ID) and status\nfor a needs_attention\ntransaction to be reconciled at par with the gateway.

\n

Learn more\nabout needs_attention\ntransaction status

\n* voided -

The transaction got voided or authorization expired at gateway.

\n* late_failure -

Indicates that a successful payment transaction has failed now due to a late failure notification from the payment gateway, typically caused by issues like insufficient funds or a closed bank account.

\n* timeout -

Transaction failed because of Gateway not accepting the connection.

\n* success -

The transaction is successful.

\n* failure -

Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure

\n* in_progress -

Transaction is being processed by the gateway. This typically happens for direct debit transactions\nor, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.

", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "txn_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this refund occured.\n", "example" : null }, "txn_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount of this refund transaction.\n", "minimum" : 0, "example" : null } }, "required" : [ "txn_amount", "txn_date", "txn_id", "txn_status" ], "example" : null }, "example" : null }, "linked_payments" : { "type" : "array", "deprecated" : false, "description" : "The list of payments captured for this authorization transaction.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the transaction.\n", "maxLength" : 40, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "

The status of this transaction.

\n* needs_attention -

When connection with the Gateway gets terminated abruptly. For needs_attention\nstatus Chargebee automatically reconcile the transaction for few gateways, for rest of the gateways you have to use the Reconcile transaction API.\nYou can use this API to update the id_at_gateway\n(Gateway Transaction ID) and status\nfor a needs_attention\ntransaction to be reconciled at par with the gateway.

\n

Learn more\nabout needs_attention\ntransaction status

\n* success -

The transaction is successful.

\n* voided -

The transaction got voided or authorization expired at gateway.

\n* in_progress -

Transaction is being processed by the gateway. This typically happens for direct debit transactions\nor, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.

\n* failure -

Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure

\n* late_failure -

Indicates that a successful payment transaction has failed now due to a late failure notification from the payment gateway, typically caused by issues like insufficient funds or a closed bank account.

\n* timeout -

Transaction failed because of Gateway not accepting the connection.

", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount for this transaction.\n", "minimum" : 0, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null } }, "required" : [ "id" ], "example" : null }, "example" : null }, "error_detail" : { "type" : "object", "deprecated" : false, "description" : "Comprehensive information regarding the error experienced during an unsuccessful or declined transaction. Learn more about \\[gateway error references\\](/docs/api/v2/pcv-1/gateway_error_references)\n", "properties" : { "request_id" : { "type" : "string", "deprecated" : false, "description" : "This is a unique identifier assigned by the payment gateway. It is used to track the request at the payment gateway\n", "maxLength" : 100, "example" : null }, "error_category" : { "type" : "string", "deprecated" : false, "description" : "This parameter categorizes the type of error that occurred for the request. It helps in understanding whether the error is due to API error, validation, processing, network issues, and more\n", "maxLength" : 100, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "A gateway-specific code that corresponds to the particular error encountered for the request. This code can be used for identifying the error in a standardized manner across the gateway's services\n", "maxLength" : 100, "example" : null }, "error_message" : { "type" : "string", "deprecated" : false, "description" : "A message provided by the gateway that describes the nature of the error encountered\n", "maxLength" : 65000, "example" : null }, "decline_code" : { "type" : "string", "deprecated" : false, "description" : "When a transaction is declined, this code is provided by the gateway to specify the reason for the decline\n", "maxLength" : 100, "example" : null }, "decline_message" : { "type" : "string", "deprecated" : false, "description" : "This message gives a descriptive explanation of the reason for the transaction's decline\n", "maxLength" : 65000, "example" : null }, "network_error_code" : { "type" : "string", "deprecated" : false, "description" : "This code represents errors that originate from the payment network (such as Visa, MasterCard, and more). It is different from the gateway error code and is specific to the network's error-handling system\n", "maxLength" : 100, "example" : null }, "network_error_message" : { "type" : "string", "deprecated" : false, "description" : "This the network related error message from the gateway, this is a detailed message provided by the payment network explaining the nature of the network error encountered\n", "maxLength" : 65000, "example" : null }, "error_field" : { "type" : "string", "deprecated" : false, "description" : "This parameter indicates which specific data field or attribute in the request caused the error\n", "maxLength" : 100, "example" : null }, "recommendation_code" : { "type" : "string", "deprecated" : false, "description" : "After an error has occurred, the gateway or payment network may provide a recommendation code. This code suggests a course of action or remedy that you can follow to resolve the issue\n", "maxLength" : 100, "example" : null }, "recommendation_message" : { "type" : "string", "deprecated" : false, "description" : "This message is intended to provide guidance or suggestions on action or remedy that you can follow to resolve the issue\n", "maxLength" : 65000, "example" : null }, "processor_error_code" : { "type" : "string", "deprecated" : false, "description" : "This code is provided by the payment processor (the entity that handles the transaction between the bank accounts and the payment networks) and indicates errors that occur at this stage of the payment process\n", "maxLength" : 100, "example" : null }, "processor_error_message" : { "type" : "string", "deprecated" : false, "description" : "This message describes the specific error that the payment processor encountered\n", "maxLength" : 65000, "example" : null }, "error_cause_id" : { "type" : "string", "deprecated" : false, "description" : "A [Chargebee-defined code](/docs/api/errors)\nthat corresponds to the specific error encountered during the request. This code helps in identifying and standardizing the error across different gateway services for consistent error handling.\n", "maxLength" : 150, "example" : null }, "processor_advice_code" : { "type" : "string", "deprecated" : false, "description" : "

An advice code from the payment gateway or network that indicates how to handle a card decline. For example, the value try_again_later means you can retry the transaction.

", "maxLength" : 100, "example" : null } }, "example" : null } }, "required" : [ "currency_code", "deleted", "gateway", "id", "payment_method", "type" ], "example" : null }, "TransactionCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" } }, "required" : [ "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "TransactionDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" } }, "required" : [ "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "TransactionUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction" } }, "required" : [ "transaction" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "TrialEndAction" : { "type" : "string", "deprecated" : false, "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "Type" : { "type" : "string", "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", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay", "free_trial", "pay_up_front", "pay_as_you_go", "simple", "compound", "usage_exceeded", "spend_exceeded", "credit_balance_dropped", "credit", "debit", "hold", "unhold" ], "example" : null }, "UnbilledCharge" : { "type" : "object", "description" : "

Unbilled charge represents the charges that are held by passing invoice_immediately in various operations such as update subscription, add charge, create subscription, etc. Learn more.

If any invoice is to be created for a subscription all the unbilled charges associated with the subscription will be included in that invoice.

If any invoice is to be created for a customer, all the unbilled charges associated with its subscriptions will be included in that invoice.

Any automatic invoice creation like renewal, activation, etc., will include the unbilled charges.

Subscriptions are invoiced at the start of every term based on the recurring items and charged immediately against the customer's credit card if 'auto_collection' is turned 'on', otherwise the resulting invoice will be created as 'Payment Due'.

If consolidated invoicing is enabled, the charges during the subscription renewals/activations will be held and consolidated at the last renewal/activation that takes place on that particular day.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies an unbilled charge.\n", "maxLength" : 40, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the customer being charged.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the subscription this charge belongs to.\n", "maxLength" : 50, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start date of this charge.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End date of this charge.\n", "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Unit amount of the charge item.\n", "minimum" : 0, "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "The pricing scheme for this line item.\n\\* tiered -\n\nThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n\\* volume -\n\nThe per unit price is based on the tier that the total quantity falls in.\n\\* per_unit -\n\nA fixed price per unit quantity.\n\\* flat_fee -\n\nA fixed price that is not quantity-based.\n\\* stairstep -\n\nA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Quantity of the item which is represented by this charge.\n", "minimum" : 0, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total amount of this charge. Typically equals to unit amount x quantity.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the charge.\n", "maxLength" : 3, "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total discounts for this charge.\n", "minimum" : 0, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this charge.\n", "maxLength" : 250, "example" : null }, "entity_type" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\\* charge_item_price -\n\nIndicates that this line item is based on charge Item Price\n\\* addon_item_price -\n\nIndicates that this line item is based on addon Item Price\n\\* plan_item_price -\n\nIndicates that this line item is based on plan Item Price\n\\* adhoc -\n\nIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n", "enum" : [ "adhoc", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "entity_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the modelled entity this charge is based on. Will be null for 'adhoc' entity type.\n", "maxLength" : 100, "example" : null }, "is_voided" : { "type" : "boolean", "default" : false, "deprecated" : false, "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.\n", "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating the date and time this charge got voided.\n", "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "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](/docs/api/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of this entity. Returned when the entity is quantity-based and [multi-decimal pricing](/docs/api/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the amount for the charge, in major units of the currency. Typically equals to unit_amount_in_decimal\nx quantity_in_decimal.\nReturned when multi-decimal pricing\nis enabled.

", "maxLength" : 39, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the unbilled charge was created.\n", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the unbilled charge was last updated\n", "example" : null }, "is_advance_charge" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "The value of this parameter will be true if it is a recurring unbilled charge for a future term.\n", "example" : null }, "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the [business entity](/docs/api/advanced-features)\nof this unbilled charge. This is always the same as the [business entity](/docs/api/unbilled_charges/unbilled_charge-object#customer_id)\nof the customer.\n", "maxLength" : 50, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates that this resource has been deleted.\n", "example" : null }, "tiers" : { "type" : "array", "deprecated" : false, "description" : "The list of tiers applicable for this line item\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "starting_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The lower limit of a range of units for the tier\n", "minimum" : 0, "example" : null }, "ending_unit" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The upper limit of a range of units for the tier\n", "example" : null }, "quantity_used" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of units purchased in a range.\n", "minimum" : 0, "example" : null }, "unit_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The price of the tier if the charge model is a stairtstep\npricing , or the price of each unit in the tier if the charge model is tiered\n/volume\npricing.

", "minimum" : 0, "example" : null }, "starting_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next lower tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep\nand multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "ending_unit_in_decimal" : { "type" : "string", "deprecated" : false, "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\nof the next higher tier. Returned only when the line_items.pricing_model\nis tiered\n, volume\nor stairstep and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "quantity_used_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the quantity purchased from this tier. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 33, "example" : null }, "unit_amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "

The decimal representation of the per-unit price for the tier when the pricing_model\nis tiered\nor volume.\nWhen the pricing_model\nis stairstep\n, it is the decimal representation of the total price for line_item.\nThe value is in major units of the currency. Returned when the line_item\nis quantity-based and multi-decimal pricing\nis enabled.

", "maxLength" : 40, "example" : null }, "pricing_type" : { "type" : "string", "deprecated" : false, "description" : "

Pricing type for the tier.

\n* package -

Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).

\n* flat_fee -

Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep\npricing model, pricing_type\nwill be set to flat_fee\nby default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.

\n* per_unit -

Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).

", "enum" : [ "per_unit", "flat_fee", "package" ], "example" : null }, "package_size" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "

Package size for the tier when pricing type is package.\nSpecify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

", "minimum" : 1, "example" : null } }, "required" : [ "quantity_used", "starting_unit", "unit_amount" ], "example" : null }, "example" : null } }, "required" : [ "currency_code", "deleted", "entity_type", "is_voided", "updated_at" ], "example" : null }, "UnbilledChargesCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "UnbilledChargesDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "UnbilledChargesHandling" : { "type" : "string", "deprecated" : false, "enum" : [ "no_action", "invoice" ], "example" : null }, "UnbilledChargesInvoicedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null }, "invoice" : { "$ref" : "#/components/schemas/Invoice" } }, "required" : [ "invoice", "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "UnbilledChargesMeta" : { "type" : "object", "properties" : { "count" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "example" : null }, "has_more" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, "required" : [ "count", "has_more" ], "example" : null }, "UnbilledChargesOption" : { "type" : "string", "deprecated" : false, "enum" : [ "invoice", "delete" ], "example" : null }, "UnbilledChargesVoidedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/UnbilledCharge" }, "example" : null } }, "required" : [ "unbilled_charges" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "UnpaidInvoicesHandling" : { "type" : "string", "deprecated" : false, "enum" : [ "no_action", "schedule_payment_collection" ], "example" : null }, "Usage" : { "type" : "object", "description" : "

Advanced Usage-Based Billing

For high-scale usage ingestion, use Advanced Usage-Based Billing with the Usage Events API. The Usage Events API supports schemaless event ingestion at scale, including individual events, batch ingestion, and usage file ingestion.

The Usages API is used to record usage for metered item prices in a subscription. This API is only applicable when Automated Metered Billing is enabled in Chargebee.

Metered items are those that are billed based on the service usage. Common examples include:

An item is marked metered by setting its metered attribute as true. Only recurring items can be can be set as metered. Recurring items are those of type plan or addon. A subscription can have both metered and non-metered items. The usages API (described in this page), is used to add, retrieve and delete usages for the metered items in a subscription.

Invoicing Metered Item Prices

While non-metered items are invoiced in a prepaid manner at the beginning of each billing cycle; for metered items, the charges are raised at the end of the billing term (postpaid). During the course of the billing period, usages can be added as and when they occur. For a given subscription_id and item_price_id, there can be only one usage record for a specific usage_date. At the end of each term, the invoice is generated with status as pending. Any remaining usage records can continue to be added to the subscription until the invoice closes automatically or is closed via an API call. If a usage record has erroneous information and you want to correct it, delete the usage and add it again.

Max Usages

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable id for the usage. If not provided, it is autogenerated.\n", "maxLength" : 100, "example" : null }, "usage_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "

The time at which this usage occurred. Chargebee bills only those usages whose\nusage_date\nfalls within a time when the subscription status\nwas active\nor non_renewing.\nHowever, the remaining usage records are still stored and are\nretrievable.

\n

Note:\nIf usage_date\ncorresponds to a time already invoiced, then it is stored but never invoiced unless the invoice is regenerated\n.

", "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the [subscription](/docs/api/subscriptions)\nto which this usage record belongs.\n", "maxLength" : 100, "example" : null }, "item_price_id" : { "type" : "string", "deprecated" : false, "description" : "The id of the [item price](/docs/api/item_prices)\nto which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.\n", "maxLength" : 100, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "

When the usage has been invoiced, this is the id\nof the invoice.\nThis is cleared when the invoice is voided\nor deleted.

", "maxLength" : 100, "example" : null }, "line_item_id" : { "type" : "string", "deprecated" : false, "description" : "

When the usage has been invoiced, this is the id\nof the invoice.line_item\nthat the usage is for. This is cleared when the invoice is voided\nor deleted\n.

", "maxLength" : 100, "example" : null }, "quantity" : { "type" : "string", "deprecated" : false, "description" : "The quantity specified for this usage record.\n", "maxLength" : 40, "example" : null }, "source" : { "type" : "string", "deprecated" : false, "description" : "The source from which the usage record was created.\n\\* admin_console -\n\nOperation made through the Chargebee admin UI\n\\* api -\n\nOperation made through the API\n\\* bulk_operation -\n\nOperation that are triggerd through bulk operation.\n", "enum" : [ "admin_console", "api", "bulk_operation" ], "example" : null }, "note" : { "type" : "string", "deprecated" : false, "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/retrieve-invoice-as-pdf)\nor [Hosted Pages](/docs/api/hosted_pages)\n.\n", "maxLength" : 500, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this usage resource was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when the item was created.\n", "example" : null } }, "required" : [ "created_at", "item_price_id", "quantity", "subscription_id", "usage_date" ], "example" : null }, "UsageAccumulationResetFrequency" : { "type" : "string", "deprecated" : false, "enum" : [ "never", "subscription_billing_frequency" ], "example" : null }, "UsageCharge" : { "type" : "object", "description" : "

Usage charge represents the current, unbilled usage for a metered feature in a subscription within its active usage period.\nEach usage charge reflects usage accumulated from the start of the current usage period up to the time of the request.\nIt includes:

", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the subscription to which the usage charge applies.\n", "maxLength" : 100, "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the [feature](/docs/api/features/feature-object#id) for which usage is tracked.\n", "maxLength" : 100, "example" : null }, "included_usage" : { "type" : "string", "deprecated" : false, "description" : "Usage included in the [subscription entitlement](/docs/api/subscription_entitlements/subscription-entitlement-object) for the current usage period.\n", "maxLength" : 33, "example" : null }, "total_usage" : { "type" : "string", "deprecated" : false, "description" : "Total usage accumulated so far for the feature in the current usage period.\n", "maxLength" : 33, "example" : null }, "on_demand_usage" : { "type" : "string", "deprecated" : false, "description" : "Usage beyond the included entitlement for the current usage period. Returned only when the feature has an associated metered addon.\n", "maxLength" : 33, "example" : null }, "metered_item_price_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the metered [item price](/docs/api/item_prices/item-price-object) used to calculate charges. Returned only when the feature has an associated metered addon.\n", "maxLength" : 100, "example" : null }, "amount" : { "type" : "string", "deprecated" : false, "description" : "Current overage charge computed from usage recorded so far, in major units of the currency. This value can change until the usage period ends. Returned only when the feature has an associated metered addon.\n", "maxLength" : 39, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "ISO [currency code](/docs/api/currencies/currency-object#currency_code) in which the overage charges are computed. Returned only when amount exists.\n", "maxLength" : 3, "example" : null }, "usage_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start timestamp of the usage window used to compute the accumulated [total_usage](/docs/api/usage_charges/usage-charge-object#total_usage) for the feature.\n", "example" : null }, "usage_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End timestamp of the usage window used to compute the accumulated [total_usage](/docs/api/usage_charges/usage-charge-object#total_usage) for the feature.\n", "example" : null } }, "required" : [ "feature_id", "subscription_id", "usage_from", "usage_to" ], "example" : null }, "UsageEvent" : { "type" : "object", "description" : "This resource allows you to record usage events, which are essential for usage-based billing. These events track customer consumption and calculate charges based on actual usage. You can send usage data to Chargebee using two endpoints: [Ingest a Usage Event](/docs/api/usage_events/create-a-usage-event) for individual events and [Ingest Usage Events in Batch](/docs/api/usage_events/ingest-usages-in-batch) for bulk submissions.\n\nThe usage event resource payload is schema-less, providing the flexibility to adapt to your unique business requirements. Because usage events are not directly tied to a pricing plan, this resource enables independent tracking of feature consumption. Events are processed and associated with relevant features as usage data. This information is used for billing alongside [entitlements](/docs/api/entitlements), [items](/docs/api/items)(such as plans or addons), or [item prices](/docs/api/item_prices) to generate invoices. This decoupling of usage data from the product catalog provides flexibility in defining and monetizing usage beyond predefined pricing models. Additionally, this API supports feature usage analytics, churn prediction, and other insights. \n**Note**\n:- [Learn more](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/usage-based-billing-usecases) about the use cases associated with this resource.\n\n* [Learn more](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/understanding-usages) about the Usage-based Billing.\n* [Learn more](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/ingesting-usage-from-amazon-s3) about ingesting usage events from Amazon S3. \n**See also**\n\n* [Limits for Usage-based Billing in Chargebee](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/understanding-usages#usage-based-billing-limits)\n", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of a subscription.\n", "maxLength" : 50, "example" : null }, "deduplication_id" : { "type" : "string", "deprecated" : false, "description" : "

An identifier used by the Chargebee's customer to distinguish between multiple events generated at the same timestamp for a single subscription_id.\nThe combination of usage_timestamp, subscription_id, and deduplication_id uniquely identifies each event.

\n

Example:\nIf 3 events are generated for subscription_id = sub-1 at 2025-04-01T00:00:00.000Z, each event must have a distinct deduplication_id.

", "maxLength" : 36, "example" : null }, "usage_timestamp" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

The timestamp indicating when this usage occurred, represented as Epoch\ntime in milliseconds\n.\nExample: 1738732394123\nrepresents the timestamp for February 5, 2025, at 05:13:14.123 UTC.

\n

Note:\nThe timestamp must be within the last 12 hours\n.

", "example" : null }, "properties" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "

A schema-less field that accepts any JSON-formatted data to define the attributes of the ingested event. It is a requirement to structure the data in a flat format wherever possible for better compatibility with downstream processing.\nWe strongly encourage using unique field names-particularly for fields intended for metering purposes. This approach enhances clarity and maintainability in the future.\nFor example, a field named status,

\n\n

Note:

", "example" : null } }, "required" : [ "deduplication_id", "properties", "subscription_id", "usage_timestamp" ], "example" : null }, "UsageFile" : { "type" : "object", "description" : "

Represents a file containing usage events that has been uploaded for processing.\n

Upload usage events using files

Follow these steps to upload usage event files:

Step 1: Request an usage_file object using the upload endpoint. This returns an url.

Step 2: Create a CSV file containing the usage event records. Ensure that the file meets the expected format and complies with the file upload constraints. Only text/csv files are supported.

Step 3: Upload the CSV file using the returned url.\nMake an HTTP PUT request to the upload URL. Include the file in the request body as binary data (raw file content).

Step 4: Check the uploaded usage_file_status using the retrieve_file_processing_status endpoint.

Important\n:\nLearn more about ingesting usage events from Amazon S3.

Best practices

File upload constraints

See also

File field constraints

deduplication_idsubscription_idusage_timestampinput_tokensoutput_tokens
123e4567-e89b-12d3Sub-011741156511000100100
987f6543-b21c-34a5Sub-021741156511001859194
Valid ExamplesInvalid Examples
input_tokensInputTokens
output_tokensOutput Tokens
feature_usage_1123output
output_valueoutput@value
input_valueinput-value

Validating and handling errors

When uploading a usage events file using the API, certain validation checks are performed. If issues are detected, the upload or processing may fail. The following sections explain the possible error scenarios and how they are handled.

Error CodeDescription
INVALID_FILE

This error occurs in the following scenarios:

    \n
  • The file is not in a supported MIME type, so the upload URL is not generated.
  • \n
  • The file contains invalid or corrupt content that prevents successful parsing.\nError Message: "The file format, size, or content is invalid. Please ensure the file is in the correct format and adheres to the size limits."
  • \n
DUPLICATE_COLUMNSThis error occurs when the file contains duplicate column headers, which must be unique. Error Message: "Duplicate columns found: [list of duplicates]. Please remove duplicates from your file before uploading again."
RECORD_LIMIT_EXCEEDEDThis error occurs when the number of records in the uploaded file exceeds the system-defined limit. The [limit] placeholder specifies the maximum allowed records. Error Message: "The number of records exceeds the allowed limit of [limit]. Please reduce the number of records in the file and try uploading again."
PARTIAL_FAILUREThis error indicates that some records in the file failed to process, while others were processed successfully. Review the failed records in the UI or failed queue for more details. Error Message: "Some records in the file could not be processed successfully. Please check the failed records in the [UI/Failed Queue] for more details."
COMPLETE_FAILUREThis error indicates that all records in the uploaded file failed to process. Review the file, fix the issues, and try uploading it again. Error Message: "All records in the file failed to process. Please check the failed records in the [UI/Failed Queue] for more details."
INVALID_COLUMNSThis error indicates that the file contains invalid column headers. Error Message: "Invalid columns found: [list of invalid headers]. Please correct column names in your file before uploading again."

Note:\nUsage events flagged as failed appear in the Usages > Failed Events\nsection of the Admin UI Dashboard.

", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the usage file.\n", "maxLength" : 36, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "The name of the uploaded file.\n", "maxLength" : 150, "example" : null }, "mime_type" : { "type" : "string", "deprecated" : false, "description" : "

Indicates the format of a file.

\n

Note:\nCurrently, only text/csv\nis supported.

", "maxLength" : 100, "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "A short, machine-readable code that indicates the reason for the failure. [Learn more](/docs/api/usage_files)\nabout the error codes.\n", "maxLength" : 50, "example" : null }, "error_reason" : { "type" : "string", "deprecated" : false, "description" : "A descriptive, human-readable message explaining the failure. [Learn more](/docs/api/usage_files)\nabout the error messages.\n", "maxLength" : 500, "example" : null }, "status" : { "type" : "string", "default" : "queued", "deprecated" : false, "description" : "Current status of the usage file.\n\\* processed -\n\nThe file processing is completed.\n\\* failed -\n\nThe file failed to process.\n\\* imported -\n\nThe file has been imported.\n\\* processing -\n\nThe file is currently being processed.\n\\* queued -\n\nThe file is queued for upload.\n", "enum" : [ "queued", "imported", "processing", "processed", "failed" ], "example" : null }, "total_records_count" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Total number of records in the file.\n", "example" : null }, "processed_records_count" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Number of records that were successfully processed.\n", "example" : null }, "failed_records_count" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Number of records that failed validation or import.\n", "example" : null }, "file_size_in_bytes" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The size of the file in bytes.\n", "example" : null }, "processing_started_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the file processing began.\n", "example" : null }, "processing_completed_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the file processing was completed.\n", "example" : null }, "uploaded_by" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the user or system that uploaded the file.\n", "maxLength" : 100, "example" : null }, "uploaded_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the file was uploaded.\n", "example" : null }, "error_file_path" : { "type" : "string", "deprecated" : false, "description" : "Amazon S3 path in your bucket where the error file containing error codes is uploaded.\n", "maxLength" : 2000, "example" : null }, "error_file_url" : { "type" : "string", "deprecated" : false, "description" : "

Pre-signed URL for the error_file\ncontaining error_codes.\nThe link is valid for 60 minutes.

", "maxLength" : 2000, "example" : null }, "upload_details" : { "type" : "object", "deprecated" : false, "description" : "Contains details of the file upload.\n", "properties" : { "url" : { "type" : "string", "deprecated" : false, "description" : "Pre-signed URL that allows you to upload usage events file.\n", "maxLength" : 2000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Expiry time of the pre-signed URL.\n", "example" : null } }, "required" : [ "expires_at", "url" ], "example" : null } }, "required" : [ "id", "mime_type", "name" ], "example" : null }, "UsageFileIngestedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "usage_file" : { "$ref" : "#/components/schemas/UsageFile" } }, "required" : [ "usage_file" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "UsageReminderInfo" : { "type" : "object", "description" : "", "properties" : { "usage_date_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "", "example" : null }, "usage_date_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "", "example" : null } }, "example" : null }, "UsageSummary" : { "type" : "object", "description" : "Usage summary represents aggregated usage data for a metered [feature](/docs/api/features/feature-object) in a [subscription](/docs/api/subscriptions/subscription-object) over a specific reporting period. The aggregation is performed based on the [aggregation method](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/defining-metered-features) configured in Billing.\n\nUse this resource to analyze feature-level usage for reporting or analytics purposes, independent of usage billing or invoicing.\n", "properties" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the subscription for which usage is reported.\n", "maxLength" : 50, "example" : null }, "feature_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the metered feature for which usage is aggregated.\n", "maxLength" : 100, "example" : null }, "aggregated_value" : { "type" : "string", "deprecated" : false, "description" : "

The total usage aggregated over the reporting window defined by aggregated_from and aggregated_to. The aggregation is performed based on the aggregation method configured in Billing.

", "maxLength" : 33, "example" : null }, "aggregated_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start timestamp (inclusive) of the aggregation window in UTC.\n", "example" : null }, "aggregated_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end timestamp (exclusive) of the aggregation window in UTC.\n", "example" : null } }, "required" : [ "aggregated_from", "aggregated_to", "aggregated_value", "feature_id", "subscription_id" ], "example" : null }, "ValidationStatus" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null }, "Variant" : { "type" : "object", "description" : "A product variant is a specific product version with a unique combination of product option values.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The immutable unique identifier of a product variant.\n", "maxLength" : 100, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "This is a unique name that appears for each product variant to the end user.\n", "maxLength" : 100, "example" : null }, "external_name" : { "type" : "string", "deprecated" : false, "description" : "This is a unique name appears for each product variant to the end user.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description of the product variant.\n", "maxLength" : 500, "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "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.\n", "maxLength" : 100, "example" : null }, "deleted" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Product variant is deleted or not. If the value is true\nthen the product variant has been deleted else it exists. Once the product variant is deleted, you can reuse the product variant id\nand name\n.

", "example" : null }, "product_id" : { "type" : "string", "deprecated" : false, "description" : "The unique identifier of the product that is associated with this variant.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Status of the product variant.\n\\* active -\n\nThe active product variants are visible on the storefront, subscription, or checkout.\n\\* inactive -\n\nThe inactive product variants are not visible on the storefront, subscription, or checkout.\n", "enum" : [ "active", "inactive" ], "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the product variant was created.\n", "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this product variant was last updated.\n", "example" : null }, "metadata" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "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\\](/docs/api/advanced-features#metadata) .\n", "example" : null }, "option_values" : { "type" : "array", "deprecated" : false, "description" : "List of product variants option values.\n", "items" : { "type" : "object", "deprecated" : false, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "Name of the option values.\n", "maxLength" : 100, "example" : null }, "value" : { "type" : "string", "deprecated" : false, "description" : "

Pass values of the option_values\n.

", "maxLength" : 100, "example" : null } }, "example" : null }, "example" : null } }, "required" : [ "created_at", "deleted", "name", "product_id" ], "example" : null }, "VariantCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "variant" : { "$ref" : "#/components/schemas/Variant" } }, "required" : [ "variant" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VariantDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "variant" : { "$ref" : "#/components/schemas/Variant" } }, "required" : [ "variant" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VariantUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "variant" : { "$ref" : "#/components/schemas/Variant" } }, "required" : [ "variant" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VaultTokenCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "vaulted_payment_method" : { "$ref" : "#/components/schemas/VaultedPaymentMethod" } }, "required" : [ "vaulted_payment_method" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VaultTokenDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "vaulted_payment_method" : { "$ref" : "#/components/schemas/VaultedPaymentMethod" } }, "required" : [ "vaulted_payment_method" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VaultTokenUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "vaulted_payment_method" : { "$ref" : "#/components/schemas/VaultedPaymentMethod" } }, "required" : [ "vaulted_payment_method" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VaultedPaymentMethod" : { "type" : "object", "properties" : { "id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "credit_card_id" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "modified_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, "required" : [ "created_at", "credit_card_id", "customer_id", "id", "modified_at" ], "example" : null }, "VirtualBankAccount" : { "type" : "object", "description" : "A virtual bank account gives customers a dedicated account to pay into, so you don't share your organization's sensitive bank account details with them. You can create a virtual bank account for a customer and share the payment instructions. Customers pay using methods such as ACH credit or wire transfer. Chargebee automatically applies incoming funds to the customer's due invoices.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the virtual bank account\n", "maxLength" : 40, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email address associated with the virtual bank account\n", "maxLength" : 70, "example" : null }, "scheme" : { "type" : "string", "default" : "ach_credit", "deprecated" : false, "description" : "

Type of the credit transfer

\n* eu_automated_bank_transfer -

EU Automated Bank Transfer

\n* ach_credit -

ACH Credit Transfer

\n

This scheme is deprecated. Instead of ach_credit\nuse us_automated_bank_transfer\n.

\n* gb_automated_bank_transfer -

UK Automated Bank Transfer

\n* mx_automated_bank_transfer -

MX Automated Bank Transfer

\n* jp_automated_bank_transfer -

JP Automated Bank Transfer

\n* us_automated_bank_transfer -

US Automated Bank Transfer

\n* sepa_credit -

SEPA Credit Transfer

\n

This scheme is deprecated. Instead of sepa_credit\nuse eu_automated_bank_transfer\n.

", "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" ], "example" : null }, "bank_name" : { "type" : "string", "deprecated" : false, "description" : "Name of the bank\n", "maxLength" : 100, "example" : null }, "account_number" : { "type" : "string", "deprecated" : false, "description" : "The account number to which funds will be transferred.\n", "maxLength" : 50, "minLength" : 5, "example" : null }, "routing_number" : { "type" : "string", "deprecated" : false, "description" : "The routing number of the bank\n", "maxLength" : 50, "minLength" : 3, "example" : null }, "swift_code" : { "type" : "string", "deprecated" : false, "description" : "Swift code of the bank in which the account exists.\n", "maxLength" : 11, "minLength" : 3, "example" : null }, "gateway" : { "type" : "string", "deprecated" : false, "description" : "Name of the gateway this virtual bank account is stored in.\n\\* twikey -\n\nTwikey is a payment service provider that specializes in processing direct debit payments across the EU.\n\\* ecentric -\n\nEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n\\* bluesnap -\n\nBlueSnap is a payment gateway.\n\\* jp_morgan -\n\nJ.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different [payment_source_type](/docs/api/payment_sources/payment_source-object#type). \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/jp-morgan-bacs&ref=feature) to enable the J.P. Morgan Mobility Payment Solutions gateway via payFURL for your test and live sites.\n\\* tco -\n\n2Checkout is a payment gateway.\n\\* first_data_global -\n\nFirst Data Global Gateway Virtual Terminal Account\n\\* payway -\n\nPayway is a payment gateway that enables secure card and payment acceptance.\n\\* moyasar -\n\nMoyasar is a fully integrated online payment service that makes accepting payments simple and secure.\n\\* exact -\n\nExact Payments is a payment gateway.\n\\* deutsche_bank -\n\nDeutsche Bank is the leading German bank with strong European roots and a global network. \nThis feature is a **Private Beta Release**.\n\\* bluepay -\n\nBluePay is a payment gateway.\n\\* paypal_express_checkout -\n\nPayPal Express Checkout is a payment gateway.\n\\* nuvei -\n\nNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/nuvei&ref=feature) to enable Nuvei for your test and live sites.\n\\* eway -\n\neWAY Account is a payment gateway.\n\\* metrics_global -\n\nMetrics global is a leading payment service provider providing unified payment services in the US.\n\\* paypal_payflow_pro -\n\nPayPal Payflow Pro is a payment gateway.\n\\* razorpay -\n\nRazorpay 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.\n\\* global_payments -\n\nGlobal Payments is a payment service provider.\n\\* amazon_payments -\n\nAmazon Payments is a payment service provider.\n\\* dlocal -\n\nDlocal provides payment solutions for global commerce by accepting local payment methods.\n\\* not_applicable -\n\nIndicates that payment gateway is not applicable for this resource.\n\\* windcave -\n\nWindcave provides an end to end payment processing solution in ANZ and other leading global markets.\n\\* checkout_com -\n\nCheckout.com is a payment gateway.\n\\* adyen -\n\nAdyen is a payment gateway.\n\\* braintree -\n\nBraintree is a payment gateway.\n\\* nmi -\n\nNMI is a payment gateway.\n\\* quickbooks -\n\nIntuit QuickBooks Payments gateway\n\\* wepay -\n\nWePay is a payment gateway.\n\\* worldpay -\n\nWorldPay is a payment gateway\n\\* paystack -\n\nPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. \nThis feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/paystack&ref=feature) to enable Paystack for your test and live sites.\n\\* ezidebit -\n\nEzidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \nThis feature is a **Private Beta Release**.\n\\* pay_com -\n\nPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n\\* wirecard -\n\nWireCard Account is a payment service provider.\n\\* chargebee_payments -\n\nChargebee Payments gateway\n\\* sage_pay -\n\nSage Pay is a payment gateway.\n\\* moneris_us -\n\nMoneris USA is a payment gateway.\n\\* pin -\n\nPin is a payment gateway\n\\* authorize_net -\n\nAuthorize.net is a payment gateway\n\\* elavon -\n\nElavon Virtual Merchant is a payment solution.\n\\* paypal_pro -\n\nPayPal Pro Account is a payment gateway.\n\\* orbital -\n\nChase Paymentech(Orbital) is a payment gateway.\n\\* paypal -\n\nPayPal Commerce is a payment gateway.\n\\* beanstream -\n\nBambora(formerly known as Beanstream) is a payment gateway.\n\\* hdfc -\n\nHDFC Account is a payment gateway.\n\\* ingenico_direct -\n\nWorldline Online Payments is a payment gateway.\n\\* ogone -\n\nIngenico ePayments (formerly known as Ogone) is a payment gateway.\n\\* migs -\n\nMasterCard Internet Gateway Service payment gateway.\n\\* tempus -\n\nTempus Technologies is a payment gateway and payments technology provider offering secure payment processing with point-to-point encryption (P2PE) and tokenization.\n\\* stripe -\n\nStripe is a payment gateway.\n\\* vantiv -\n\nVantiv is a payment gateway.\n\\* moneris -\n\nMoneris is a payment gateway.\n\\* bank_of_america -\n\nBank of America Gateway\n\\* chargebee -\n\nChargebee test gateway.\n\\* eway_rapid -\n\neWAY Rapid is a payment gateway.\n\\* gocardless -\n\nGoCardless is a payment service provider.\n\\* mollie -\n\nMollie is a payment gateway.\n\\* paymill -\n\nPAYMILL is a payment gateway.\n\\* balanced_payments -\n\nBalanced is a payment gateway\n\\* solidgate -\n\nSolidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \nThis feature is a **Private Beta Release**.\n\\* cybersource -\n\nCyberSource is a payment gateway.\n\\* ebanx -\n\nEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "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", "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", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this virtual bank account is stored.\n", "maxLength" : 50, "example" : null }, "resource_version" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "

Version number of this resource. The resource_version\nis updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

", "example" : null }, "updated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this virtual bank account resource was last updated.\n", "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this virtual bank account resource is created.\n", "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "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).\n", "maxLength" : 150, "example" : null }, "deleted" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates that this resource has been deleted.\n", "example" : null } }, "required" : [ "account_number", "created_at", "customer_id", "deleted", "email", "gateway", "gateway_account_id", "id", "reference_id" ], "example" : null }, "VirtualBankAccountAddedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount" } }, "required" : [ "customer", "virtual_bank_account" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VirtualBankAccountDeletedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount" } }, "required" : [ "customer", "virtual_bank_account" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VirtualBankAccountUpdatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer" }, "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount" } }, "required" : [ "customer", "virtual_bank_account" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VoucherCreateFailedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_voucher" : { "$ref" : "#/components/schemas/PaymentVoucher" } }, "required" : [ "payment_voucher" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VoucherCreatedEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_voucher" : { "$ref" : "#/components/schemas/PaymentVoucher" } }, "required" : [ "payment_voucher" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VoucherExpiredEvent" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The ID of the event\n", "example" : null }, "occurred_at" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the event\n", "example" : null }, "source" : { "type" : "string", "description" : "Source of the event\n", "example" : null }, "object" : { "type" : "string", "description" : "The object of the event\n", "example" : null }, "api_version" : { "type" : "string", "description" : "API version\n", "example" : null }, "event_type" : { "type" : "string", "description" : "Type of the event\n", "example" : null }, "webhook_status" : { "type" : "string", "description" : "Status of webhook\n", "example" : null }, "content" : { "type" : "object", "properties" : { "payment_voucher" : { "$ref" : "#/components/schemas/PaymentVoucher" } }, "required" : [ "payment_voucher" ], "example" : null } }, "required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ], "example" : null }, "VoucherType" : { "type" : "string", "deprecated" : false, "enum" : [ "boleto" ], "example" : null }, "WebhookEndpoint" : { "type" : "object", "description" : "A webhook endpoint receives real-time notifications from your Chargebee site when specific events occur, such as invoice generation, payment failures, or subscription updates. It allows your application, server, or third-party service to automatically respond to these changes, eliminating the need for manual checks or polling the API.\nEach webhook endpoint includes details such as a unique ID, target URL, list of subscribed events, and status. You can manage webhook endpoints using the Chargebee dashboard or the API. \n**Note**\nYou can create up to five webhook endpoints per site.\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the webhook.\n", "maxLength" : 40, "example" : null }, "name" : { "type" : "string", "deprecated" : false, "description" : "The name assigned to the webhook.\n", "maxLength" : 50, "example" : null }, "url" : { "type" : "string", "deprecated" : false, "description" : "The full URL of the webhook endpoint.\n", "maxLength" : 512, "example" : null }, "send_card_resource" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Controls whether card-related resources are included in the webhook payload. Card details are always masked.\n", "example" : null }, "disabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "

Indicates whether the webhook endpoint is disabled. If true\n, the endpoint is disabled; if false\n, it is enabled.

", "example" : null }, "primary_url" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether this is the primary webhook endpoint. If only one endpoint exists, it is considered primary by default.\n", "example" : null }, "api_version" : { "type" : "string", "default" : "v2", "deprecated" : false, "description" : "Specifies the API version used to format the webhook payload. Make sure this version matches the client library version used by your webhook server.\n\\* v1 -\n\nIf selected, the webhook payload includes only attributes from API v1 resources.\n\\* v2 -\n\nIf selected, the webhook payload includes only attributes from API v2 resources.\n", "enum" : [ "v1", "v2" ], "example" : null }, "chargebee_response_schema_type" : { "type" : "string", "deprecated" : false, "description" : "

Indicates the response schema used in the webhook payload, based on the product catalog version configured for the site.

\n

Note\nThis field is only applicable if the site is in compat mode.

\n* compat -

The webhook payload uses a schema compatible with both Product Catalog 1.0 and 2.0. This is applicable only to sites automatically upgraded to Product Catalog 2.0.

\n* plans_addons -

The webhook payload follows the Product Catalog 1.0\nschema and uses the Plans\nand Addons\nmodel.

\n* items -

The webhook payload follows the Product Catalog 2.0\nschema and uses the Items API model\n.

", "enum" : [ "plans_addons", "items", "compat" ], "example" : null }, "enabled_events" : { "type" : "array", "deprecated" : false, "description" : "The types of events that trigger this webhook. For a complete list, see [event types](/docs/api/webhook_endpoints)\n.\n", "items" : { "type" : "string", "deprecated" : false, "description" : "

The types of events that trigger this webhook. For a complete list, see event types\n.

\n* entitlement_overrides_auto_removed -

Triggered when subscription entitlement overrides for a feature are automatically removed after expiry.

\n* payment_source_expired -

Sent when a payment source for a customer expires.

\n* payment_succeeded -

Sent when the payment is successfully collected.

\n* order_ready_to_process -

Triggered when an order reaches its order date.

\n* price_variant_updated -

Triggered when a price variant is updated.

\n* subscription_scheduled_changes_removed -

Sent when a scheduled change for the subscription is removed.

\n* payment_failed -

Sent when an attempt to charge the customer's credit card fails.

\n* coupon_codes_deleted -

Sent when coupon codes are deleted from a coupon set.

\n* customer_changed -

Sent when a customer is changed.

\n* subscription_scheduled_resumption_removed -

Triggered when a scheduled resumption is removed for the subscription.

\n* differential_price_deleted -

Triggered when a differential price is deleted.

\n* card_expired -

Sent when a card for a customer expires.

\n* omnichannel_one_time_order_created -

Triggered when an omnichannel one-time order is created.

\n* subscription_canceled_with_backdating -

Sent when the subscription is cancelled, with the cancellation backdated. If it is cancelled due to non-payment or a missing card, the reason is available in cancel_reason.

\n* attached_item_deleted -

Triggered when an attached item is deleted.

\n* hierarchy_created -

Triggered when a hierarchy is created.

\n* order_cancelled -

Triggered when an order is cancelled.

\n* payment_due_reminder -

Sent after scheduled days of payment failure

\n* authorization_succeeded -

Triggered when an authorization transaction is created.

\n* order_deleted -

Triggered when an order is deleted.

\n* payment_initiated -

Sent when a payment is initiated via direct debit.

\n* order_resent -

Triggered when an order is resent.

\n* coupon_updated -

Sent when a coupon is changed.

\n* grant_blocks_updated - \n* item_price_updated -

Triggered when an item price is updated.

\n* coupon_set_created -

Sent when a coupon set is created.

\n* subscription_cancelled -

Sent when the subscription is cancelled. If it is cancelled due to non-payment or a missing card, the reason is available in cancel_reason.

\n* subscription_paused -

Sent when the subscription is paused.

\n* transaction_updated -

Triggered when a transaction is updated. For example, when a transaction is removed, when an excess payment is applied to an invoice, or when amount_capturable is updated.

\n* omnichannel_subscription_created -

Triggered when an omnichannel subscription is created.

\n* order_created -

Triggered when an order is created.

\n* invoice_updated -

Triggered when changes are made to a finalized invoice, including voiding, deletion, invoice address updates, status changes, and payment changes such as applying or removing a payment, applying or removing a credit, and credit note creation. pending_invoice_updated is triggered for changes specific to pending invoices; invoice_updated covers all other invoice changes.

\n* unbilled_charges_deleted -

Triggered when unbilled charges are deleted.

\n* business_entity_updated -

Sent when a business entity is updated.

\n* feature_deleted -

Triggered when a feature is deleted.

\n* omnichannel_subscription_item_dunning_started -

Triggered when an omnichannel subscription item's dunning has started.

\n* payment_source_business_entity_changed - \n* feature_archived -

Triggered when a feature is archived.

\n* attached_item_created -

Triggered when an attached item is created.

\n* card_updated -

Sent when the card is updated for a customer.

\n* gift_unclaimed -

Triggered when a new gift is unclaimed and is ready to be claimed.

\n* subscription_trial_end_reminder -

Sent when the customer's trial period is about to end.

\n* hierarchy_deleted -

Triggered when a hierarchy is deleted.

\n* subscription_changed -

Sent after the subscription's recurring items have been changed.

\n* gift_scheduled -

Triggered when a new gift is created.

\n* differential_price_created -

Triggered when a differential price is created.

\n* invoice_generated_with_backdating -

Event triggered when a new invoice is generated with a past date as the invoice date.

\n* payment_intent_updated -

Sent when a payment intent is updated.

\n* pending_invoice_updated -

Triggered when you make the following changes to a pending invoice: add a charge, add a non-recurring addon, or delete a line item.

\n* promotional_credits_deducted -

Sent when promotional credits are deducted for a customer.

\n* subscription_ramp_created -

Triggered when a subscription ramp is created.

\n* omnichannel_subscription_item_cancellation_scheduled -

Triggered when an omnichannel subscription item is scheduled for cancellation.

\n* subscription_started -

Sent when a future subscription starts on the scheduled date.

\n* credit_note_deleted -

Sent when a credit note is deleted.

\n* credit_note_updated -

Sent when a credit note is updated.

\n* item_family_created -

Triggered when an item family is created.

\n* contract_term_terminated -

Triggered when a contract term is terminated.

\n* contract_term_cancelled -

Triggered when a contract term is cancelled.

\n* sales_order_created -

Triggered when a sales order is created.

\n* subscription_cancellation_reminder -

Sent when the customer's subscription is nearing its scheduled cancellation date.

\n* item_family_deleted -

Triggered when an item family is deleted.

\n* order_returned -

Triggered when an order is marked as returned.

\n* item_price_created -

Triggered when an item price is created.

\n* business_entity_created -

Sent when a business entity is created.

\n* omnichannel_subscription_item_resumed -

Triggered when an omnichannel subscription item is resumed.

\n* subscription_renewal_reminder -

Sent before each subscription renewal, based on the plan's period.

\n* item_family_updated -

Triggered when an item family is updated.

\n* promotional_credits_added -

Sent when promotional credits are added for a customer.

\n* business_entity_deleted -

Sent when a business entity is deleted.

\n* virtual_bank_account_deleted -

Sent when a virtual bank account is deleted for a customer.

\n* payment_schedules_updated -

Event triggered when payment schedules are updated for an invoice.

\n* dunning_updated -

Sent when dunning is paused for an invoice.

\n* payment_source_added -

Sent when a payment source is added for a customer.

\n* customer_entitlements_updated -

Triggered when entitlements for a list of customers are updated.

\n* subscription_moved_in -

Triggered when a subscription is moved from another customer.

\n* item_created -

Triggered when an item is created.

\n* record_purchase_failed -

Triggered when an omnichannel record purchase fails.

\n* subscription_changes_scheduled -

Sent when subscription changes are scheduled for later. The changes are applied at the end of the current term.

\n* feature_created -

Triggered when a feature is created.

\n* coupon_set_deleted -

Sent when a coupon set is deleted.

\n* item_deleted -

Triggered when an item is deleted.

\n* coupon_set_updated -

Sent when a coupon set is changed.

\n* subscription_items_renewed -

Sent when one or more subscription items are renewed.

\n* subscription_scheduled_cancellation_removed -

Sent when a scheduled cancellation is removed for the subscription.

\n* coupon_created -

Sent when a coupon is created.

\n* omnichannel_subscription_item_upgraded -

Triggered when an omnichannel subscription item is upgraded.

\n* order_updated -

Triggered when an order is updated.

\n* item_price_deleted -

Triggered when an item price is deleted.

\n* purchase_created -

Triggered when a purchase action is completed successfully.

\n* gift_cancelled -

Triggered when a gift is cancelled.

\n* subscription_renewed -

Sent when the subscription is renewed from the current term.

\n* omnichannel_subscription_item_cancelled -

Triggered when an omnichannel subscription item is cancelled.

\n* subscription_scheduled_pause_removed -

Triggered when a scheduled pause is removed for the subscription.

\n* grant_blocks_created - \n* quote_updated -

Triggered when a quote is updated.

\n* customer_created -

Sent when a customer is created. This event occurs when a new customer is created on its own, or when a customer is created automatically during subscription creation.

\n* tax_withheld_refunded -

Sent when a tax withheld refund is made.

\n* alert_status_changed -

Triggered when an alert's runtime status for a subscription changes between IN_ALARM and WITHIN_LIMIT.\nThis indicates a change in the subscription's usage relative to the alert threshold and applies only to usage-based billing.

\n* coupon_deleted -

Sent when a coupon is deleted.

\n* order_delivered -

Triggered when an order is marked as delivered.

\n* differential_price_updated -

Triggered when a differential price is updated.

\n* subscription_pause_scheduled -

Sent when the subscription is scheduled to pause.

\n* omnichannel_transaction_created -

Triggered when an omnichannel transaction is created.

\n* usage_file_ingested -

Triggered when a usage file is ingested.

\n* subscription_entitlements_updated -

Triggered when subscription entitlements are updated because of a subscription change event.

\n* voucher_created -

Triggered when a payment voucher is created.

\n* entitlement_overrides_removed -

Triggered when an override entitlement is removed.

\n* subscription_business_entity_changed -

Sent when a subscription's business entity is changed.

\n* subscription_ramp_drafted -

Triggered when a subscription ramp is moved to draft status.

\n* add_usages_reminder -

Sent every month day before renewal date of plan's period

\n* contract_term_created -

Triggered when a new contract term is created.

\n* subscription_resumed -

Sent when the subscription is moved from the paused state to the active state.

\n* virtual_bank_account_updated -

Sent when the virtual bank account is updated for a customer.

\n* order_ready_to_ship -

Triggered when an order reaches its shipping date.

\n* omnichannel_subscription_imported -

Triggered when an omnichannel subscription item is imported.

\n* payment_source_expiring -

Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date.

\n* ledger_updated - \n* omnichannel_subscription_item_grace_period_started -

Triggered when an omnichannel subscription item's grace period has started.

\n* subscription_advance_invoice_schedule_removed -

Triggered when a scheduled advance invoice is removed for a subscription.

\n* subscription_entitlements_created -

Triggered when subscription entitlements are created for a new subscription.

\n* card_added -

Sent when a card is added for a customer.

\n* customer_moved_out -

Sent when a customer is copied to another site.

\n* gift_updated -

Triggered when a gift is updated.

\n* payment_schedule_scheme_deleted -

Event triggered when a payment schedule scheme is deleted.

\n* 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.

\n* customer_deleted -

Sent when a customer is deleted.

\n* price_variant_created -

Triggered when a price variant is created.

\n* customer_moved_in -

Sent when a customer is copied from another site.

\n* payment_schedule_scheme_created -

Event triggered when a new payment schedule scheme is created.

\n* contract_term_renewed -

Triggered when a contract term is renewed.

\n* item_entitlements_removed -

Triggered when item entitlements are removed for a feature.

\n* item_price_entitlements_updated -

Triggered when item price entitlements are updated for a feature.

\n* price_variant_deleted -

Triggered when a price variant is deleted.

\n* token_created -

Sent when a token is created.

\n* voucher_expired -

Triggered when a payment voucher expires.

\n* omnichannel_subscription_item_expired -

Triggered when an omnichannel subscription item expires.

\n* item_updated -

Triggered when an item is updated.

\n* feature_activated -

Triggered when a feature status transitions to active for the first time.

\n* unbilled_charges_invoiced -

Triggered when unbilled charges are invoiced.

\n* omnichannel_subscription_item_renewed -

Triggered when an omnichannel subscription item is renewed.

\n* gift_claimed -

Triggered when a gift is claimed.

\n* omnichannel_one_time_order_item_cancelled -

Triggered when an omnichannel one-time order item is cancelled.

\n* unbilled_charges_voided -

Triggered when unbilled charges are voided.

\n* omnichannel_subscription_item_scheduled_change_removed -

Triggered when a scheduled change for an omnichannel subscription item is removed.

\n* subscription_created_with_backdating -

Sent when a new subscription is created with backdating.

\n* subscription_reactivated -

Sent when the subscription is moved from the cancelled state to the active or in_trial state.

\n* ledger_account_balance_updated - \n* payment_source_locally_deleted -

Sent when a payment source for a customer is removed from Chargebee.

\n* authorization_voided -

Triggered when an authorization transaction is voided. An authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time.

\n* token_expired -

Sent when a token expires.

\n* omnichannel_subscription_item_reactivated -

Triggered when an omnichannel subscription item is reactivated.

\n* omnichannel_subscription_item_updated -

Triggered when an omnichannel subscription item is updated.

\n* subscription_activated_with_backdating -

Sent after the subscription changes to active from another status, while the change is backdated.

\n* invoice_deleted -

Event triggered when an invoice is deleted.

\n* quote_deleted -

Triggered when a quote is deleted.

\n* subscription_reactivated_with_backdating -

Sent when the subscription is moved from the cancelled state to the active or in_trial state, with a past date.

\n* subscription_moved_out -

Triggered when a subscription is moved to another customer.

\n* subscription_shipping_address_updated -

Triggered when a shipping address is added or updated for a subscription.

\n* token_consumed -

Sent when a token is consumed.

\n* transaction_deleted -

Triggered when a transaction is deleted.

\n* subscription_ramp_deleted -

Triggered when a subscription ramp is deleted.

\n* subscription_trial_extended -

Sent when the trial period of a subscription is extended.

\n* coupon_codes_updated -

Sent when coupon codes are updated.

\n* 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.

\n* subscription_advance_invoice_schedule_added -

Triggered when an advance invoice is scheduled for a subscription.

\n* vault_token_updated -

Triggered when a vaulted payment method is updated.

\n* virtual_bank_account_added -

Sent when a virtual bank account is added for a customer.

\n* subscription_movement_failed -

Triggered when a subscription movement fails.

\n* tax_withheld_deleted -

Triggered when a tax withheld is deleted.

\n* omnichannel_subscription_item_change_scheduled -

Triggered when an omnichannel subscription item change is scheduled.

\n* entitlement_overrides_updated -

Triggered when an override entitlement is updated.

\n* payment_refunded -

Sent when a payment refund is made.

\n* item_entitlements_updated -

Triggered when item entitlements are updated for a feature.

\n* payment_source_updated -

Sent when the payment source is updated for a customer, or when a role is assigned to the payment source.

\n* quote_created -

Triggered when a quote is created.

\n* feature_reactivated -

Triggered when a feature status transitions to active for the second time or more.

\n* credit_note_created -

Sent when a credit note is created.

\n* gift_expired -

Triggered when a gift expires.

\n* transaction_created -

Triggered when a transaction is recorded.

\n* payment_source_deleted -

Sent when a payment source is deleted for a customer.

\n* coupon_codes_added -

Sent when coupon codes are added to a coupon set.

\n* omnichannel_subscription_item_recovered -

Triggered when an omnichannel subscription item is recovered from a grace period or dunning.

\n* rule_created -

Triggered when a rule is created.

\n* subscription_activated -

Sent after the subscription has been moved from the trial state to the active state.

\n* customer_business_entity_changed -

Sent when a customer's business entity is changed.

\n* omnichannel_subscription_item_changed -

Triggered when an omnichannel subscription item is changed.

\n* omnichannel_subscription_item_grace_period_expired -

Triggered when an omnichannel subscription item's grace period has expired.

\n* subscription_ramp_updated -

Triggered when a subscription ramp is updated.

\n* item_price_entitlements_removed -

Triggered when item price entitlements are removed for a feature.

\n* subscription_changed_with_backdating -

Sent after the subscription's recurring items have been changed, with the change backdated.

\n* rule_updated -

Triggered when a rule is updated.

\n* mrr_updated -

Sent when the MRR or CMRR of a subscription changes.

\n* feature_updated -

Triggered when a feature is updated.

\n* subscription_ramp_applied -

Triggered when a subscription ramp is applied.

\n* card_deleted -

Sent when a card is deleted for a customer.

\n* omnichannel_subscription_item_pause_scheduled -

Triggered when an omnichannel subscription item is scheduled for pause.

\n* sales_order_updated -

Triggered when a sales order is updated.

\n* subscription_cancellation_scheduled -

Sent when a subscription is scheduled to be cancelled at the end of the current term.

\n* subscription_deleted -

Sent when a subscription has been deleted.

\n* voucher_create_failed -

Triggered when payment voucher creation fails.

\n* omnichannel_subscription_item_dunning_expired -

Triggered when an omnichannel subscription item's dunning has expired.

\n* vault_token_deleted -

Triggered when a vaulted payment method is deleted from the vault.

\n* card_expiry_reminder -

Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date.

\n* subscription_resumption_scheduled -

Triggered when the subscription resumption is scheduled.

\n* vault_token_created -

Triggered when a payment method is tokenized and stored in the vault.

\n* omnichannel_subscription_item_resubscribed -

Triggered when an omnichannel subscription item is resubscribed.

\n* refund_initiated -

Sent when a refund is initiated via direct debit.

\n* omnichannel_subscription_item_downgraded -

Triggered when an omnichannel subscription item is downgraded.

\n* omnichannel_subscription_moved_in -

Triggered when an omnichannel subscription is moved to another customer.

\n* omnichannel_subscription_item_paused -

Triggered when an omnichannel subscription item is paused.

\n* omnichannel_subscription_item_scheduled_cancellation_removed -

Triggered when a scheduled cancellation for an omnichannel subscription item is removed.

\n* payment_schedules_created -

Event triggered when new payment schedules are created for an invoice.

\n* subscription_advance_invoice_schedule_updated -

Triggered when a scheduled advance invoice is updated for a subscription.

\n* credit_note_created_with_backdating -

Sent when a credit note is created with a past date as the credit note date.

\n* unbilled_charges_created -

Triggered when unbilled charges are created.

\n* rule_deleted -

Triggered when a rule is deleted.

\n* attached_item_updated -

Triggered when an attached item is updated.

\n* payment_intent_created -

Sent when a payment intent is created.

\n* contract_term_completed -

Triggered when a contract term is completed.

\n* tax_withheld_recorded -

Triggered when a tax withheld is recorded for an invoice.

\n* subscription_created -

Sent when a new subscription is created.

", "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_items_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", "payment_schedules_created", "payment_schedules_updated", "payment_schedule_scheme_created", "payment_schedule_scheme_deleted", "subscription_renewal_reminder", "add_usages_reminder", "payment_due_reminder", "transaction_created", "transaction_updated", "transaction_deleted", "payment_succeeded", "payment_failed", "dunning_updated", "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", "subscription_entitlements_updated", "business_entity_created", "business_entity_updated", "business_entity_deleted", "customer_business_entity_changed", "subscription_business_entity_changed", "payment_source_business_entity_changed", "purchase_created", "voucher_created", "voucher_expired", "voucher_create_failed", "item_price_entitlements_updated", "item_price_entitlements_removed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_updated", "price_variant_created", "price_variant_updated", "price_variant_deleted", "customer_entitlements_updated", "subscription_moved_in", "subscription_moved_out", "subscription_movement_failed", "omnichannel_subscription_created", "omnichannel_subscription_item_renewed", "omnichannel_subscription_item_downgraded", "omnichannel_subscription_item_expired", "omnichannel_subscription_item_cancellation_scheduled", "omnichannel_subscription_item_scheduled_cancellation_removed", "omnichannel_subscription_item_resubscribed", "omnichannel_subscription_item_upgraded", "omnichannel_subscription_item_cancelled", "omnichannel_subscription_imported", "omnichannel_subscription_item_grace_period_started", "omnichannel_subscription_item_grace_period_expired", "omnichannel_subscription_item_dunning_started", "omnichannel_subscription_item_dunning_expired", "rule_created", "rule_updated", "rule_deleted", "record_purchase_failed", "omnichannel_subscription_item_change_scheduled", "omnichannel_subscription_item_scheduled_change_removed", "omnichannel_subscription_item_reactivated", "sales_order_created", "sales_order_updated", "omnichannel_subscription_item_changed", "omnichannel_subscription_item_paused", "omnichannel_subscription_item_resumed", "omnichannel_one_time_order_created", "omnichannel_one_time_order_item_cancelled", "usage_file_ingested", "omnichannel_subscription_item_pause_scheduled", "omnichannel_subscription_moved_in", "omnichannel_transaction_created", "alert_status_changed", "omnichannel_subscription_item_updated", "omnichannel_subscription_item_recovered", "omnichannel_subscription_item_mrr_updated", "ledger_account_balance_updated", "grant_blocks_created", "grant_blocks_updated", "ledger_updated", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "example" : null } }, "required" : [ "api_version", "disabled", "id", "name", "primary_url", "url" ], "example" : null }, "WindowSize" : { "type" : "string", "deprecated" : false, "enum" : [ "month", "week", "day", "hour", "minute" ], "example" : null } }, "parameters" : { "payment-voucher-id" : { "name" : "payment-voucher-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "item-price-id" : { "name" : "item-price-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "reason-code-id" : { "name" : "reason-code-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "metered-feature-id" : { "name" : "metered-feature-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "differential-price-id" : { "name" : "differential-price-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "tax-withheld-id" : { "name" : "tax-withheld-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "sales-order-id" : { "name" : "sales-order-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "in-app-subscription-app-id" : { "name" : "in-app-subscription-app-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "quote-id" : { "name" : "quote-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "limit" : { "name" : "limit", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "description" : "The number of resources to be returned.", "x-cb-is-pagination-parameter" : true, "maximum" : 100, "minimum" : 1, "example" : null } }, "include_deleted" : { "name" : "include_deleted", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "description" : "Indicates whether to include deleted objects in the list. The deleted objects have the attribute `deleted` as `true`." } }, "credit-unit-id" : { "name" : "credit-unit-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-request-origin-ip" : { "name" : "chargebee-request-origin-ip", "in" : "header", "description" : "The IP address of the customer where the request originated", "required" : false, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The IP address of the customer where the request originated", "example" : "192.168.1.2", "pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){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})))?::)))))$" } }, "coupon-code-code" : { "name" : "coupon-code-code", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "pc2-migration-item-family-id" : { "name" : "pc2-migration-item-family-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "vaulted-payment-method-id" : { "name" : "vaulted-payment-method-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-business-entity-id" : { "name" : "chargebee-business-entity-id", "in" : "header", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.", "required" : false, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.", "maxLength" : 50 } }, "offset" : { "name" : "offset", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "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.", "x-cb-is-pagination-parameter" : true, "maxLength" : 1000, "example" : null } }, "chargebee-async-callback-url" : { "name" : "chargebee-async-callback-url", "in" : "header", "description" : "The callback URL where Chargebee will POST the async result. Must be an https:// URL and may embed basic-auth credentials, e.g. https://username:password@example.com.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "uri", "description" : "The callback URL where Chargebee will POST the async result. Must be an https:// URL and may embed basic-auth credentials, e.g. https://username:password@example.com.", "example" : "https://username:password@example.com" }, "x-cb-async-header" : true }, "entitlement-override-id" : { "name" : "entitlement-override-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "subscription-id" : { "name" : "subscription-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "hosted-page-id" : { "name" : "hosted-page-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "credit-note-id" : { "name" : "credit-note-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "virtual-bank-account-id" : { "name" : "virtual-bank-account-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-event-webhook" : { "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" ] } }, "e-invoicing-country-country" : { "name" : "e-invoicing-country-country", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "coupon-set-id" : { "name" : "coupon-set-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "non-subscription-app-id" : { "name" : "non-subscription-app-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "business-entity-transfer-id" : { "name" : "business-entity-transfer-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "portal-session-id" : { "name" : "portal-session-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "attached-item-id" : { "name" : "attached-item-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "plan-id" : { "name" : "plan-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-request-origin-user-encoded" : { "name" : "chargebee-request-origin-user-encoded", "in" : "header", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.", "required" : false, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.", "example" : "dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t" } }, "ruleset-id" : { "name" : "ruleset-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "meter-id" : { "name" : "meter-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "business-entity-id" : { "name" : "business-entity-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "item-id" : { "name" : "item-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "item-billing-metric-id" : { "name" : "item-billing-metric-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "subscription-entitlement-id" : { "name" : "subscription-entitlement-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "customer-id" : { "name" : "customer-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "cust-payment-source-id" : { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "site-currency-id" : { "name" : "site-currency-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-request-origin-device" : { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "The device from which the customer has made the request", "example" : "Android" } }, "thunking-plan-id" : { "name" : "thunking-plan-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "tp-site-user-domain" : { "name" : "tp-site-user-domain", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "payment-schedule-scheme-id" : { "name" : "payment-schedule-scheme-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "event-id" : { "name" : "event-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "async-response-id" : { "name" : "async-response-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "site-owner-id" : { "name" : "site-owner-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "rule-id" : { "name" : "rule-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "time-machine-name" : { "name" : "time-machine-name", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "item-family-id" : { "name" : "item-family-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "omnichannel-subscription-item-id" : { "name" : "omnichannel-subscription-item-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "product-id" : { "name" : "product-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "omnichannel-one-time-order-id" : { "name" : "omnichannel-one-time-order-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "Prefer" : { "name" : "Prefer", "in" : "header", "description" : "Must be set to respond-async. Instructs Chargebee to process the request asynchronously and return 202 Accepted immediately.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "Must be set to respond-async. Instructs Chargebee to process the request asynchronously and return 202 Accepted immediately.", "example" : "respond-async" }, "x-cb-async-header" : true }, "site-id" : { "name" : "site-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "invoice-id" : { "name" : "invoice-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "feature-id" : { "name" : "feature-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "transaction-id" : { "name" : "transaction-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "business-rule-id" : { "name" : "business-rule-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "offer-fulfillment-id" : { "name" : "offer-fulfillment-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "cb-token-id" : { "name" : "cb-token-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "purchase-id" : { "name" : "purchase-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "ledger-operation-id" : { "name" : "ledger-operation-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-event-email" : { "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" ] } }, "omnichannel-subscription-id" : { "name" : "omnichannel-subscription-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "price-variant-id" : { "name" : "price-variant-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "comment-id" : { "name" : "comment-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "webhook-endpoint-id" : { "name" : "webhook-endpoint-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "pc2-migration-item-id" : { "name" : "pc2-migration-item-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "usage-file-id" : { "name" : "usage-file-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "coupon-id" : { "name" : "coupon-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "alert-id" : { "name" : "alert-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "recorded-purchase-id" : { "name" : "recorded-purchase-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "payment-intent-id" : { "name" : "payment-intent-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-request-id" : { "name" : "chargebee-request-id", "in" : "header", "description" : "A client-generated unique identifier (UUID recommended) for this request. Echoed back as request.id in the async callback payload, allowing you to correlate each callback to its originating request.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "description" : "A client-generated unique identifier (UUID recommended) for this request. Echoed back as request.id in the async callback payload, allowing you to correlate each callback to its originating request.", "example" : "7c9e2f4a-8b1d-4e6f-9a0c-3d5e7f9b1c2d", "maxLength" : 100 }, "x-cb-async-header" : true }, "tp-integ-sync-detail-id" : { "name" : "tp-integ-sync-detail-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "order-id" : { "name" : "order-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "pc2-migration-item-price-id" : { "name" : "pc2-migration-item-price-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "product-variant-id" : { "name" : "product-variant-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "account-credit-id" : { "name" : "account-credit-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-event-actions" : { "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" ] } }, "pc2-migration-id" : { "name" : "pc2-migration-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "async-api-request-id" : { "name" : "async-api-request-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "chargebee-request-origin-user" : { "name" : "chargebee-request-origin-user", "in" : "header", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.", "required" : false, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "format" : "email", "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.", "example" : "user@example.com" } }, "ramp-id" : { "name" : "ramp-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "custom-pricing-unit-id" : { "name" : "custom-pricing-unit-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "export-id" : { "name" : "export-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "gift-id" : { "name" : "gift-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "unbilled-charge-id" : { "name" : "unbilled-charge-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, "addon-id" : { "name" : "addon-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } }, "securitySchemes" : { "BasicAuth" : { "type" : "http", "scheme" : "basic" } } }, "jsonSchemaDialect" : "https://spec.openapis.org/oas/3.1/dialect/base", "webhooks" : { "subscription_pause_scheduled" : { "description" : "

Triggered when the subscription is scheduled to pause.

", "post" : { "summary" : "Triggered when the subscription is scheduled to pause.", "description" : "

Triggered when the subscription is scheduled to pause.

", "operationId" : "onSubscription_pause_scheduledWebhook", "requestBody" : { "description" : "Payload for subscription_pause_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionPauseScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "customer_business_entity_changed" : { "post" : { "summary" : "Triggered when a customer's business entity is changed", "operationId" : "onCustomer_business_entity_changedWebhook", "requestBody" : { "description" : "Payload for customer_business_entity_changed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CustomerBusinessEntityChangedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_advance_invoice_schedule_added" : { "description" : "

Triggered when advance invoice is scheduled for a subscription.

", "post" : { "summary" : "Triggered when advance invoice is scheduled for a subscription.", "description" : "

Triggered when advance invoice is scheduled for a subscription.

", "operationId" : "onSubscription_advance_invoice_schedule_addedWebhook", "requestBody" : { "description" : "Payload for subscription_advance_invoice_schedule_added event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionAdvanceInvoiceScheduleAddedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "gift_expired" : { "description" : "

Triggered when a gift expires.

", "post" : { "summary" : "Triggered when a gift expires.", "description" : "

Triggered when a gift expires.

", "operationId" : "onGift_expiredWebhook", "requestBody" : { "description" : "Payload for gift_expired event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/GiftExpiredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "tax_withheld_deleted" : { "description" : "

Triggered when a tax withheld is deleted.

", "post" : { "summary" : "Triggered when a tax withheld is deleted.", "description" : "

Triggered when a tax withheld is deleted.

", "operationId" : "onTax_withheld_deletedWebhook", "requestBody" : { "description" : "Payload for tax_withheld_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TaxWithheldDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "unbilled_charges_deleted" : { "description" : "

Triggered when unbilled charges are deleted

", "post" : { "summary" : "Triggered when unbilled charges are deleted", "description" : "

Triggered when unbilled charges are deleted

", "operationId" : "onUnbilled_charges_deletedWebhook", "requestBody" : { "description" : "Payload for unbilled_charges_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UnbilledChargesDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_updated" : { "description" : "

Triggered when a coupon is changed.

", "post" : { "summary" : "Triggered when a coupon is changed.", "description" : "

Triggered when a coupon is changed.

", "operationId" : "onCoupon_updatedWebhook", "requestBody" : { "description" : "Payload for coupon_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "grant_blocks_created" : { "description" : "

Triggered when one or more grant blocks are created for a subscription unit.\nThe event content includes the created grant_blocks.

", "post" : { "summary" : "Triggered when one or more grant blocks are created for a subscription unit.", "description" : "

Triggered when one or more grant blocks are created for a subscription unit.\nThe event content includes the created grant_blocks.

", "operationId" : "onGrant_blocks_createdWebhook", "requestBody" : { "description" : "Payload for grant_blocks_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/GrantBlocksCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "product_updated" : { "post" : { "summary" : "Triggered when a product resource is updated successfully", "operationId" : "onProduct_updatedWebhook", "requestBody" : { "description" : "Payload for product_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ProductUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "omnichannel_subscription_item_reactivated" : { "description" : "

Triggered when an omnichannel subscription item's refund is reversed.

", "post" : { "summary" : "Triggered when an omnichannel subscription item's refund is reversed", "description" : "

Triggered when an omnichannel subscription item's refund is reversed.

", "operationId" : "onOmnichannel_subscription_item_reactivatedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_reactivated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemReactivatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_renewed" : { "description" : "

Triggered when an omnichannel subscription item is renewed.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is renewed", "description" : "

Triggered when an omnichannel subscription item is renewed.

", "operationId" : "onOmnichannel_subscription_item_renewedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_renewed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemRenewedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "unbilled_charges_created" : { "description" : "

Triggered when unbilled charges are created

", "post" : { "summary" : "Triggered when unbilled charges are created", "description" : "

Triggered when unbilled charges are created

", "operationId" : "onUnbilled_charges_createdWebhook", "requestBody" : { "description" : "Payload for unbilled_charges_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UnbilledChargesCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_resumed" : { "description" : "

Triggered when the subscription is resumed.

", "post" : { "summary" : "Triggered when the subscription is resumed.", "description" : "

Triggered when the subscription is resumed.

", "operationId" : "onSubscription_resumedWebhook", "requestBody" : { "description" : "Payload for subscription_resumed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionResumedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_one_time_order_item_cancelled" : { "post" : { "summary" : "Triggered when an omnichannel one time order item is cancelled", "operationId" : "onOmnichannel_one_time_order_item_cancelledWebhook", "requestBody" : { "description" : "Payload for omnichannel_one_time_order_item_cancelled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelOneTimeOrderItemCancelledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_cancelled" : { "description" : "

Triggered when the subscription is cancelled. If it is cancelled due to non payment or because the card details are not present, the subscription will have the possible reason as 'cancel_reason'.

", "post" : { "summary" : "Triggered when the subscription is cancelled. If it is cancelled due to non payment or because the card details are not present, the subscription will have the possible reason as 'cancel_reason'.", "description" : "

Triggered when the subscription is cancelled. If it is cancelled due to non payment or because the card details are not present, the subscription will have the possible reason as 'cancel_reason'.

", "operationId" : "onSubscription_cancelledWebhook", "requestBody" : { "description" : "Payload for subscription_cancelled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionCancelledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_entitlements_removed" : { "description" : "

One or more item_entitlements were removed for an item or a feature.

", "post" : { "summary" : "One or more `item_entitlement`s were removed for an `item` or a `feature`.", "description" : "

One or more item_entitlements were removed for an item or a feature.

", "operationId" : "onItem_entitlements_removedWebhook", "requestBody" : { "description" : "Payload for item_entitlements_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemEntitlementsRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "business_entity_created" : { "description" : "

Triggered when a business entity is created

", "post" : { "summary" : "Triggered when a business entity is created", "description" : "

Triggered when a business entity is created

", "operationId" : "onBusiness_entity_createdWebhook", "requestBody" : { "description" : "Payload for business_entity_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BusinessEntityCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_set_updated" : { "description" : "

Triggered when a coupon set is updated.

", "post" : { "summary" : "Triggered when a coupon set is updated.", "description" : "

Triggered when a coupon set is updated.

", "operationId" : "onCoupon_set_updatedWebhook", "requestBody" : { "description" : "Payload for coupon_set_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponSetUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "differential_price_updated" : { "description" : "

Triggered when a differential price is updated.

", "post" : { "summary" : "Triggered when a differential price is updated.", "description" : "

Triggered when a differential price is updated.

", "operationId" : "onDifferential_price_updatedWebhook", "requestBody" : { "description" : "Payload for differential_price_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DifferentialPriceUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_paused" : { "description" : "

Triggered when an omnichannel subscription item is paused.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is paused", "description" : "

Triggered when an omnichannel subscription item is paused.

", "operationId" : "onOmnichannel_subscription_item_pausedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_paused event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemPausedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "entitlement_overrides_removed" : { "description" : "

Triggered when one or more entitlement_override objects are removed. This is not triggered when Chargebee removes the objects automatically upon expiry.

", "post" : { "summary" : "Triggered when one or more `entitlement_override` objects are removed. This is not triggered when Chargebee removes the objects automatically upon expiry.", "description" : "

Triggered when one or more entitlement_override objects are removed. This is not triggered when Chargebee removes the objects automatically upon expiry.

", "operationId" : "onEntitlement_overrides_removedWebhook", "requestBody" : { "description" : "Payload for entitlement_overrides_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/EntitlementOverridesRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_activated_with_backdating" : { "description" : "

Triggered after the subscription changes to active from another status, while the change is backdated.

", "post" : { "summary" : "Triggered after the subscription changes to `active` from another `status`, while the change is backdated.", "description" : "

Triggered after the subscription changes to active from another status, while the change is backdated.

", "operationId" : "onSubscription_activated_with_backdatingWebhook", "requestBody" : { "description" : "Payload for subscription_activated_with_backdating event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionActivatedWithBackdatingEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_trial_end_reminder" : { "description" : "

Triggered 6 days prior to the trial period's end date.

", "post" : { "summary" : "Triggered 6 days prior to the trial period's end date.", "description" : "

Triggered 6 days prior to the trial period's end date.

", "operationId" : "onSubscription_trial_end_reminderWebhook", "requestBody" : { "description" : "Payload for subscription_trial_end_reminder event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionTrialEndReminderEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_shipping_address_updated" : { "description" : "

Triggered when shipping address is added or updated for a subscription.

", "post" : { "summary" : "Triggered when shipping address is added or updated for a subscription.", "description" : "

Triggered when shipping address is added or updated for a subscription.

", "operationId" : "onSubscription_shipping_address_updatedWebhook", "requestBody" : { "description" : "Payload for subscription_shipping_address_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionShippingAddressUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "voucher_create_failed" : { "description" : "

Triggered when the Payment voucher Creation fails.

", "post" : { "summary" : "Triggered when the Payment voucher Creation fails.", "description" : "

Triggered when the Payment voucher Creation fails.

", "operationId" : "onVoucher_create_failedWebhook", "requestBody" : { "description" : "Payload for voucher_create_failed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VoucherCreateFailedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "gift_claimed" : { "description" : "

Triggered when a gift is claimed.

", "post" : { "summary" : "Triggered when a gift is claimed.", "description" : "

Triggered when a gift is claimed.

", "operationId" : "onGift_claimedWebhook", "requestBody" : { "description" : "Payload for gift_claimed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/GiftClaimedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "customer_deleted" : { "description" : "

Triggered when a customer is deleted.

", "post" : { "summary" : "Triggered when a customer is deleted.", "description" : "

Triggered when a customer is deleted.

", "operationId" : "onCustomer_deletedWebhook", "requestBody" : { "description" : "Payload for customer_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CustomerDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "refund_initiated" : { "description" : "

Triggered when a refund is initiated using the direct_debit payment method, or when a transaction enters the in_progress status due to asynchronous processing at the payment gateway.

", "post" : { "summary" : "Triggered when a refund is initiated via direct debit.", "description" : "

Triggered when a refund is initiated using the direct_debit payment method, or when a transaction enters the in_progress status due to asynchronous processing at the payment gateway.

", "operationId" : "onRefund_initiatedWebhook", "requestBody" : { "description" : "Payload for refund_initiated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RefundInitiatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "invoice_generated_with_backdating" : { "description" : "

Triggered when an invoice has been created with date set to a value in the past. However, if the invoice is created with a pending status and the site setting is to set invoice.date to the date of closing the invoice, this event is never triggered.

", "post" : { "summary" : "Triggered when an invoice has been created with date set to a value in the past. However, if the invoice is created with a pending status and the site setting is to set invoice.date to the date of closing the invoice, this event is never triggered.", "description" : "

Triggered when an invoice has been created with date set to a value in the past. However, if the invoice is created with a pending status and the site setting is to set invoice.date to the date of closing the invoice, this event is never triggered.

", "operationId" : "onInvoice_generated_with_backdatingWebhook", "requestBody" : { "description" : "Payload for invoice_generated_with_backdating event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/InvoiceGeneratedWithBackdatingEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_transaction_created" : { "description" : "

Triggered when an omnichannel transaction is created.

", "post" : { "summary" : "Triggered when an omnichannel transaction is created", "description" : "

Triggered when an omnichannel transaction is created.

", "operationId" : "onOmnichannel_transaction_createdWebhook", "requestBody" : { "description" : "Payload for omnichannel_transaction_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelTransactionCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "add_usages_reminder" : { "description" : "

Triggered on one day before term end of every month.

", "post" : { "summary" : "Triggered on one day before term end of every month.", "description" : "

Triggered on one day before term end of every month.

", "operationId" : "onAdd_usages_reminderWebhook", "requestBody" : { "description" : "Payload for add_usages_reminder event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AddUsagesReminderEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "voucher_created" : { "description" : "

Triggered when a Payment voucher is created.

", "post" : { "summary" : "Triggered when a Payment voucher is created.", "description" : "

Triggered when a Payment voucher is created.

", "operationId" : "onVoucher_createdWebhook", "requestBody" : { "description" : "Payload for voucher_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VoucherCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "rule_updated" : { "post" : { "summary" : "Triggered when a rule is updated", "operationId" : "onRule_updatedWebhook", "requestBody" : { "description" : "Payload for rule_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RuleUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_schedules_created" : { "post" : { "summary" : "Event triggered when payment schedules are created for an invoice.", "operationId" : "onPayment_schedules_createdWebhook", "requestBody" : { "description" : "Payload for payment_schedules_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSchedulesCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "feature_activated" : { "description" : "

Triggered when a feature status transitions to active for the first time.

", "post" : { "summary" : "Triggered when a `feature` status transitions to `active` for the first time.", "description" : "

Triggered when a feature status transitions to active for the first time.

", "operationId" : "onFeature_activatedWebhook", "requestBody" : { "description" : "Payload for feature_activated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/FeatureActivatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_source_locally_deleted" : { "description" : "

Triggered when a payment source is deleted at Chargebee.

", "post" : { "summary" : "Triggered when a payment source is deleted at Chargebee.", "description" : "

Triggered when a payment source is deleted at Chargebee.

", "operationId" : "onPayment_source_locally_deletedWebhook", "requestBody" : { "description" : "Payload for payment_source_locally_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSourceLocallyDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "invoice_generated" : { "description" : "

Event triggered when a new invoice is created except when created with status as pending. For pending invoices, this event is triggered when the invoice is closed.

", "post" : { "summary" : "Event triggered when a new invoice is created except when created with status as pending. For pending invoices, this event is triggered when the invoice is closed.", "description" : "

Event triggered when a new invoice is created except when created with status as pending. For pending invoices, this event is triggered when the invoice is closed.

", "operationId" : "onInvoice_generatedWebhook", "requestBody" : { "description" : "Payload for invoice_generated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/InvoiceGeneratedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "voucher_expired" : { "description" : "

Triggered when a Payment voucher is Expired.

", "post" : { "summary" : "Triggered when a Payment voucher is Expired.", "description" : "

Triggered when a Payment voucher is Expired.

", "operationId" : "onVoucher_expiredWebhook", "requestBody" : { "description" : "Payload for voucher_expired event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VoucherExpiredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "authorization_succeeded" : { "description" : "

Triggered when a authorization transaction is created.

", "post" : { "summary" : "Triggered when a authorization transaction is created.", "description" : "

Triggered when a authorization transaction is created.

", "operationId" : "onAuthorization_succeededWebhook", "requestBody" : { "description" : "Payload for authorization_succeeded event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AuthorizationSucceededEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "gift_scheduled" : { "description" : "

Triggered when a new gift is created.

", "post" : { "summary" : "Triggered when a new gift is created.", "description" : "

Triggered when a new gift is created.

", "operationId" : "onGift_scheduledWebhook", "requestBody" : { "description" : "Payload for gift_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/GiftScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_changes_scheduled" : { "description" : "

Triggered when subscription changes are scheduled for later. Changes will be applied at the end of current term.

", "post" : { "summary" : "Triggered when subscription changes are scheduled for later. Changes will be applied at the end of current term.", "description" : "

Triggered when subscription changes are scheduled for later. Changes will be applied at the end of current term.

", "operationId" : "onSubscription_changes_scheduledWebhook", "requestBody" : { "description" : "Payload for subscription_changes_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionChangesScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_changed_with_backdating" : { "description" : "

Triggered when a subscription is changed with changes_scheduled_at set to a value in the past.

", "post" : { "summary" : "Triggered when a subscription is changed with changes_scheduled_at set to a value in the past.", "description" : "

Triggered when a subscription is changed with changes_scheduled_at set to a value in the past.

", "operationId" : "onSubscription_changed_with_backdatingWebhook", "requestBody" : { "description" : "Payload for subscription_changed_with_backdating event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionChangedWithBackdatingEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "variant_created" : { "post" : { "summary" : "Triggered when a product variant resource is created successfully", "operationId" : "onVariant_createdWebhook", "requestBody" : { "description" : "Payload for variant_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VariantCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "omnichannel_subscription_item_changed" : { "description" : "

Triggered when an omnichannel subscription item is changed.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is changed", "description" : "

Triggered when an omnichannel subscription item is changed.

", "operationId" : "onOmnichannel_subscription_item_changedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_changed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemChangedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "gift_unclaimed" : { "description" : "

Triggered when a new gift is unclaimed and is ready to be claimed.

", "post" : { "summary" : "Triggered when a new gift is unclaimed and is ready to be claimed.", "description" : "

Triggered when a new gift is unclaimed and is ready to be claimed.

", "operationId" : "onGift_unclaimedWebhook", "requestBody" : { "description" : "Payload for gift_unclaimed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/GiftUnclaimedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "virtual_bank_account_added" : { "description" : "

Triggered when a virtual bank account is added.

", "post" : { "summary" : "Triggered when a virtual bank account is added.", "description" : "

Triggered when a virtual bank account is added.

", "operationId" : "onVirtual_bank_account_addedWebhook", "requestBody" : { "description" : "Payload for virtual_bank_account_added event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VirtualBankAccountAddedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_intent_created" : { "description" : "

Triggered when a payment intent is created.

", "post" : { "summary" : "Triggered when a payment intent is created.", "description" : "

Triggered when a payment intent is created.

", "operationId" : "onPayment_intent_createdWebhook", "requestBody" : { "description" : "Payload for payment_intent_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentIntentCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_updated" : { "description" : "

Triggered when an omnichannel subscription item is updated.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is updated", "description" : "

Triggered when an omnichannel subscription item is updated.

", "operationId" : "onOmnichannel_subscription_item_updatedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "credit_note_created_with_backdating" : { "description" : "

Triggered when a credit note is created such that generated_at is a value in the past.

", "post" : { "summary" : "Triggered when a credit note is created such that generated_at is a value in the past.", "description" : "

Triggered when a credit note is created such that generated_at is a value in the past.

", "operationId" : "onCredit_note_created_with_backdatingWebhook", "requestBody" : { "description" : "Payload for credit_note_created_with_backdating event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreditNoteCreatedWithBackdatingEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "contract_term_terminated" : { "description" : "

Triggered when contract term is terminated.

", "post" : { "summary" : "Triggered when contract term is terminated.", "description" : "

Triggered when contract term is terminated.

", "operationId" : "onContract_term_terminatedWebhook", "requestBody" : { "description" : "Payload for contract_term_terminated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ContractTermTerminatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_family_updated" : { "description" : "

Triggered when an item family is updated.

", "post" : { "summary" : "Triggered when an item family is updated.", "description" : "

Triggered when an item family is updated.

", "operationId" : "onItem_family_updatedWebhook", "requestBody" : { "description" : "Payload for item_family_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemFamilyUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_created" : { "description" : "

Triggered when an order is generated.

", "post" : { "summary" : "Triggered when an order is generated.", "description" : "

Triggered when an order is generated.

", "operationId" : "onOrder_createdWebhook", "requestBody" : { "description" : "Payload for order_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "price_variant_deleted" : { "description" : "

Triggered when a price variant resource is deleted successfully

", "post" : { "summary" : "Triggered when a price variant is deleted.", "description" : "

Triggered when a price variant resource is deleted successfully

", "operationId" : "onPrice_variant_deletedWebhook", "requestBody" : { "description" : "Payload for price_variant_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PriceVariantDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "alert_status_changed" : { "description" : "

Triggered when an alert's runtime status for a subscription changes between IN_ALARM and WITHIN_LIMIT.\nThis indicates a change in the subscription's usage relative to the alert threshold and applies only to usage-based billing.

", "post" : { "summary" : "Triggered when the status for an alert changes", "description" : "

Triggered when an alert's runtime status for a subscription changes between IN_ALARM and WITHIN_LIMIT.\nThis indicates a change in the subscription's usage relative to the alert threshold and applies only to usage-based billing.

", "operationId" : "onAlert_status_changedWebhook", "requestBody" : { "description" : "Payload for alert_status_changed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AlertStatusChangedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_movement_failed" : { "description" : "

Triggered when the subscription movement fails during moving in or out of a subscription from one customer to another asynchronously.

", "post" : { "summary" : "Triggered when a subscription movement failed", "description" : "

Triggered when the subscription movement fails during moving in or out of a subscription from one customer to another asynchronously.

", "operationId" : "onSubscription_movement_failedWebhook", "requestBody" : { "description" : "Payload for subscription_movement_failed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionMovementFailedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "customer_moved_in" : { "description" : "

Triggered when a customer is copied from another site.

", "post" : { "summary" : "Triggered when a customer is copied from another site.", "description" : "

Triggered when a customer is copied from another site.

", "operationId" : "onCustomer_moved_inWebhook", "requestBody" : { "description" : "Payload for customer_moved_in event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CustomerMovedInEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_advance_invoice_schedule_updated" : { "description" : "

Triggered when scheduled advance invoice is updated for a subscription.

", "post" : { "summary" : "Triggered when scheduled advance invoice is updated for a subscription.", "description" : "

Triggered when scheduled advance invoice is updated for a subscription.

", "operationId" : "onSubscription_advance_invoice_schedule_updatedWebhook", "requestBody" : { "description" : "Payload for subscription_advance_invoice_schedule_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionAdvanceInvoiceScheduleUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_deleted" : { "description" : "

Triggered when an item is deleted.

", "post" : { "summary" : "Triggered when an item is deleted.", "description" : "

Triggered when an item is deleted.

", "operationId" : "onItem_deletedWebhook", "requestBody" : { "description" : "Payload for item_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_ramp_drafted" : { "description" : "

Triggered when a ramp is moved to draft status.

", "post" : { "summary" : "Triggered when a ramp is drafted.", "description" : "

Triggered when a ramp is moved to draft status.

", "operationId" : "onSubscription_ramp_draftedWebhook", "requestBody" : { "description" : "Payload for subscription_ramp_drafted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionRampDraftedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "vault_token_updated" : { "post" : { "summary" : "Triggered when a vaulted payment method row is updated", "operationId" : "onVault_token_updatedWebhook", "requestBody" : { "description" : "Payload for vault_token_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VaultTokenUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "dunning_updated" : { "post" : { "summary" : "Triggered when dunning is paused for an invoice", "operationId" : "onDunning_updatedWebhook", "requestBody" : { "description" : "Payload for dunning_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DunningUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_recovered" : { "description" : "

Triggered when an omnichannel subscription item recovers from a billing issue and is active again.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is recovered from grace period or dunning", "description" : "

Triggered when an omnichannel subscription item recovers from a billing issue and is active again.

", "operationId" : "onOmnichannel_subscription_item_recoveredWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_recovered event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemRecoveredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_entitlements_updated" : { "description" : "

One or more entitlements were added or updated for an item.

", "post" : { "summary" : "One or more `item_entitlement`s were added or updated for an `item` or a `feature`.", "description" : "

One or more entitlements were added or updated for an item.

", "operationId" : "onItem_entitlements_updatedWebhook", "requestBody" : { "description" : "Payload for item_entitlements_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemEntitlementsUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "token_consumed" : { "description" : "

Triggered when a nonce is consumed.

", "post" : { "summary" : "Triggered when a nonce is consumed.", "description" : "

Triggered when a nonce is consumed.

", "operationId" : "onToken_consumedWebhook", "requestBody" : { "description" : "Payload for token_consumed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TokenConsumedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "hierarchy_deleted" : { "description" : "

Triggered when a hierarchy is deleted.

", "post" : { "summary" : "Triggered when a hierarchy is deleted.", "description" : "

Triggered when a hierarchy is deleted.

", "operationId" : "onHierarchy_deletedWebhook", "requestBody" : { "description" : "Payload for hierarchy_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HierarchyDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "vault_token_deleted" : { "post" : { "summary" : "Triggered when a vaulted payment method is soft-deleted from the vault", "operationId" : "onVault_token_deletedWebhook", "requestBody" : { "description" : "Payload for vault_token_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VaultTokenDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_cancellation_scheduled" : { "description" : "

Triggered when subscription is scheduled to cancel at end of current term.

", "post" : { "summary" : "Triggered when subscription is scheduled to cancel at end of current term.", "description" : "

Triggered when subscription is scheduled to cancel at end of current term.

", "operationId" : "onSubscription_cancellation_scheduledWebhook", "requestBody" : { "description" : "Payload for subscription_cancellation_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionCancellationScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_renewed" : { "description" : "

Triggered when the subscription is renewed from the current term.

", "post" : { "summary" : "Triggered when the subscription is renewed from the current term.", "description" : "

Triggered when the subscription is renewed from the current term.

", "operationId" : "onSubscription_renewedWebhook", "requestBody" : { "description" : "Payload for subscription_renewed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionRenewedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "feature_updated" : { "description" : "

Triggered when a feature is updated. Note: This event is not triggered when only the status of the feature has changed.

", "post" : { "summary" : "Triggered when a `feature` is updated. Note: This event is not triggered when only the `status` of the feature has changed.", "description" : "

Triggered when a feature is updated. Note: This event is not triggered when only the status of the feature has changed.

", "operationId" : "onFeature_updatedWebhook", "requestBody" : { "description" : "Payload for feature_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/FeatureUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "feature_deleted" : { "description" : "

Triggered when a feature is deleted.

", "post" : { "summary" : "Triggered when a `feature` is deleted.", "description" : "

Triggered when a feature is deleted.

", "operationId" : "onFeature_deletedWebhook", "requestBody" : { "description" : "Payload for feature_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/FeatureDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_family_created" : { "description" : "

Triggered when an item family is created.

", "post" : { "summary" : "Triggered when an item family is created.", "description" : "

Triggered when an item family is created.

", "operationId" : "onItem_family_createdWebhook", "requestBody" : { "description" : "Payload for item_family_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemFamilyCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_scheduled_change_removed" : { "description" : "

Triggered when an omnichannel subscription item scheduled change is removed.

", "post" : { "summary" : "Triggered when an omnichannel subscription item scheduled change is removed", "description" : "

Triggered when an omnichannel subscription item scheduled change is removed.

", "operationId" : "onOmnichannel_subscription_item_scheduled_change_removedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_scheduled_change_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledChangeRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_resumed" : { "description" : "

Triggered when an omnichannel subscription item is resumed.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is resumed", "description" : "

Triggered when an omnichannel subscription item is resumed.

", "operationId" : "onOmnichannel_subscription_item_resumedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_resumed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemResumedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "purchase_created" : { "description" : "

Triggered when a purchase resource is created successfully

", "post" : { "summary" : "Triggered when a purchase resource is created successfully", "description" : "

Triggered when a purchase resource is created successfully

", "operationId" : "onPurchase_createdWebhook", "requestBody" : { "description" : "Payload for purchase_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PurchaseCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "entitlement_overrides_updated" : { "description" : "

One or more entitlement_overrides for a subscription were added or updated.

", "post" : { "summary" : "One or more `entitlement_override`s for a subscription were added or updated.", "description" : "

One or more entitlement_overrides for a subscription were added or updated.

", "operationId" : "onEntitlement_overrides_updatedWebhook", "requestBody" : { "description" : "Payload for entitlement_overrides_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/EntitlementOverridesUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_family_deleted" : { "description" : "

Triggered when an item family is deleted.

", "post" : { "summary" : "Triggered when an item family is deleted.", "description" : "

Triggered when an item family is deleted.

", "operationId" : "onItem_family_deletedWebhook", "requestBody" : { "description" : "Payload for item_family_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemFamilyDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_resumption_scheduled" : { "description" : "

Triggered when the subscription is scheduled to resume.

", "post" : { "summary" : "Triggered when the subscription is scheduled to resume.", "description" : "

Triggered when the subscription is scheduled to resume.

", "operationId" : "onSubscription_resumption_scheduledWebhook", "requestBody" : { "description" : "Payload for subscription_resumption_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionResumptionScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "feature_reactivated" : { "description" : "

Triggered when a feature status transitions to active for the second time or more.

", "post" : { "summary" : "Triggered when a `feature` status transitions to `active` for the second time or more.", "description" : "

Triggered when a feature status transitions to active for the second time or more.

", "operationId" : "onFeature_reactivatedWebhook", "requestBody" : { "description" : "Payload for feature_reactivated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/FeatureReactivatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_codes_deleted" : { "description" : "

Triggered when coupon codes are deleted in coupon set.

", "post" : { "summary" : "Triggered when coupon codes are deleted in coupon set.", "description" : "

Triggered when coupon codes are deleted in coupon set.

", "operationId" : "onCoupon_codes_deletedWebhook", "requestBody" : { "description" : "Payload for coupon_codes_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponCodesDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "card_expired" : { "description" : "

Triggered when the card for a customer has expired.

", "post" : { "summary" : "Triggered when the card for a customer has expired.", "description" : "

Triggered when the card for a customer has expired.

", "operationId" : "onCard_expiredWebhook", "requestBody" : { "description" : "Payload for card_expired event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CardExpiredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "credit_note_updated" : { "description" : "

Triggered when a credit note is updated.

", "post" : { "summary" : "Triggered when a credit note is updated.", "description" : "

Triggered when a credit note is updated.

", "operationId" : "onCredit_note_updatedWebhook", "requestBody" : { "description" : "Payload for credit_note_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreditNoteUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_downgraded" : { "description" : "

Triggered when an omnichannel subscription item is downgraded.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is downgraded", "description" : "

Triggered when an omnichannel subscription item is downgraded.

", "operationId" : "onOmnichannel_subscription_item_downgradedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_downgraded event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemDowngradedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "price_variant_updated" : { "description" : "

Triggered when a price variant resource is updated successfully

", "post" : { "summary" : "Triggered when a price variant is updated.", "description" : "

Triggered when a price variant resource is updated successfully

", "operationId" : "onPrice_variant_updatedWebhook", "requestBody" : { "description" : "Payload for price_variant_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PriceVariantUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "promotional_credits_deducted" : { "description" : "

Triggered when promotional credit is deducted.

", "post" : { "summary" : "Triggered when promotional credit is deducted.", "description" : "

Triggered when promotional credit is deducted.

", "operationId" : "onPromotional_credits_deductedWebhook", "requestBody" : { "description" : "Payload for promotional_credits_deducted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PromotionalCreditsDeductedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_ramp_applied" : { "description" : "

Triggered when a ramp is executed successfully.

", "post" : { "summary" : "Triggered when a ramp is applied.", "description" : "

Triggered when a ramp is executed successfully.

", "operationId" : "onSubscription_ramp_appliedWebhook", "requestBody" : { "description" : "Payload for subscription_ramp_applied event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionRampAppliedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_paused" : { "description" : "

Triggered when the subscription is paused.

", "post" : { "summary" : "Triggered when the subscription is paused.", "description" : "

Triggered when the subscription is paused.

", "operationId" : "onSubscription_pausedWebhook", "requestBody" : { "description" : "Payload for subscription_paused event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionPausedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_ready_to_process" : { "description" : "

Triggered when an order reaches it's order date.

", "post" : { "summary" : "Triggered when an order reaches it's order date.", "description" : "

Triggered when an order reaches it's order date.

", "operationId" : "onOrder_ready_to_processWebhook", "requestBody" : { "description" : "Payload for order_ready_to_process event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderReadyToProcessEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "feature_created" : { "description" : "

Triggered when a feature is created.

", "post" : { "summary" : "Triggered when a `feature` is created.", "description" : "

Triggered when a feature is created.

", "operationId" : "onFeature_createdWebhook", "requestBody" : { "description" : "Payload for feature_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/FeatureCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "transaction_deleted" : { "description" : "

Triggered when a transaction is deleted.

", "post" : { "summary" : "Triggered when a transaction is deleted.", "description" : "

Triggered when a transaction is deleted.

", "operationId" : "onTransaction_deletedWebhook", "requestBody" : { "description" : "Payload for transaction_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "credit_note_created" : { "description" : "

Triggered when a credit note is created.

", "post" : { "summary" : "Triggered when a credit note is created.", "description" : "

Triggered when a credit note is created.

", "operationId" : "onCredit_note_createdWebhook", "requestBody" : { "description" : "Payload for credit_note_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreditNoteCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_resubscribed" : { "description" : "

Triggered when an omnichannel subscription item is resubscribed.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is resubscribed", "description" : "

Triggered when an omnichannel subscription item is resubscribed.

", "operationId" : "onOmnichannel_subscription_item_resubscribedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_resubscribed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemResubscribedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "record_purchase_failed" : { "description" : "

Triggered when the record a purchase API fails to create an omnichannel subscription.

", "post" : { "summary" : "Triggered when an omnichannel record purchase is failed", "description" : "

Triggered when the record a purchase API fails to create an omnichannel subscription.

", "operationId" : "onRecord_purchase_failedWebhook", "requestBody" : { "description" : "Payload for record_purchase_failed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RecordPurchaseFailedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_created" : { "description" : "

Triggered when an item is created.

", "post" : { "summary" : "Triggered when an item is created.", "description" : "

Triggered when an item is created.

", "operationId" : "onItem_createdWebhook", "requestBody" : { "description" : "Payload for item_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "transaction_updated" : { "description" : "

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.

", "post" : { "summary" : "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.", "description" : "

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.

", "operationId" : "onTransaction_updatedWebhook", "requestBody" : { "description" : "Payload for transaction_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "variant_deleted" : { "post" : { "summary" : "Triggered when a product variant resource is deleted successfully", "operationId" : "onVariant_deletedWebhook", "requestBody" : { "description" : "Payload for variant_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VariantDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "mrr_updated" : { "description" : "

Triggered when either of MRR or CMRR is changed.

", "post" : { "summary" : "Triggered when either of MRR or CMRR is changed.", "description" : "

Triggered when either of MRR or CMRR is changed.

", "operationId" : "onMrr_updatedWebhook", "requestBody" : { "description" : "Payload for mrr_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/MrrUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "unbilled_charges_invoiced" : { "description" : "

Triggered when unbilled charges are invoiced

", "post" : { "summary" : "Triggered when unbilled charges are invoiced", "description" : "

Triggered when unbilled charges are invoiced

", "operationId" : "onUnbilled_charges_invoicedWebhook", "requestBody" : { "description" : "Payload for unbilled_charges_invoiced event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UnbilledChargesInvoicedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_price_updated" : { "description" : "

Triggered when an item price is updated.

", "post" : { "summary" : "Triggered when an item price is updated.", "description" : "

Triggered when an item price is updated.

", "operationId" : "onItem_price_updatedWebhook", "requestBody" : { "description" : "Payload for item_price_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemPriceUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_codes_updated" : { "description" : "

Triggered when coupon codes are updated in coupon set.

", "post" : { "summary" : "Triggered when coupon codes are updated in coupon set.", "description" : "

Triggered when coupon codes are updated in coupon set.

", "operationId" : "onCoupon_codes_updatedWebhook", "requestBody" : { "description" : "Payload for coupon_codes_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponCodesUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "virtual_bank_account_updated" : { "description" : "

Triggered when the virtual bank account is updated.

", "post" : { "summary" : "Triggered when the virtual bank account is updated.", "description" : "

Triggered when the virtual bank account is updated.

", "operationId" : "onVirtual_bank_account_updatedWebhook", "requestBody" : { "description" : "Payload for virtual_bank_account_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VirtualBankAccountUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "contract_term_created" : { "description" : "

Triggered when contract term is created.

", "post" : { "summary" : "Triggered when contract term is created.", "description" : "

Triggered when contract term is created.

", "operationId" : "onContract_term_createdWebhook", "requestBody" : { "description" : "Payload for contract_term_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ContractTermCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_changed" : { "description" : "

Triggered when the subscription's recurring items are changed.

", "post" : { "summary" : "Triggered when the subscription's recurring items are changed.", "description" : "

Triggered when the subscription's recurring items are changed.

", "operationId" : "onSubscription_changedWebhook", "requestBody" : { "description" : "Payload for subscription_changed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionChangedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_failed" : { "description" : "

Triggered when the payment collection fails.

", "post" : { "summary" : "Triggered when the payment collection fails.", "description" : "

Triggered when the payment collection fails.

", "operationId" : "onPayment_failedWebhook", "requestBody" : { "description" : "Payload for payment_failed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentFailedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "credit_note_deleted" : { "description" : "

Triggered when a credit note is deleted.

", "post" : { "summary" : "Triggered when a credit note is deleted.", "description" : "

Triggered when a credit note is deleted.

", "operationId" : "onCredit_note_deletedWebhook", "requestBody" : { "description" : "Payload for credit_note_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CreditNoteDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "tax_withheld_refunded" : { "description" : "

Triggered when a tax withheld is refunded.

", "post" : { "summary" : "Triggered when a tax withheld is refunded.", "description" : "

Triggered when a tax withheld is refunded.

", "operationId" : "onTax_withheld_refundedWebhook", "requestBody" : { "description" : "Payload for tax_withheld_refunded event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TaxWithheldRefundedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "contract_term_completed" : { "description" : "

Triggered when contract term is completed.

", "post" : { "summary" : "Triggered when contract term is completed.", "description" : "

Triggered when contract term is completed.

", "operationId" : "onContract_term_completedWebhook", "requestBody" : { "description" : "Payload for contract_term_completed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ContractTermCompletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_schedules_updated" : { "post" : { "summary" : "Event triggered when payment schedules are updated.", "operationId" : "onPayment_schedules_updatedWebhook", "requestBody" : { "description" : "Payload for payment_schedules_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSchedulesUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_expired" : { "description" : "

Triggered when an omnichannel subscription item is expired.

", "post" : { "summary" : "Triggered when an omnichannel subscription item expires", "description" : "

Triggered when an omnichannel subscription item is expired.

", "operationId" : "onOmnichannel_subscription_item_expiredWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_expired event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemExpiredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "card_updated" : { "description" : "

Triggered when the card is updated for a customer.

", "post" : { "summary" : "Triggered when the card is updated for a customer.", "description" : "

Triggered when the card is updated for a customer.

", "operationId" : "onCard_updatedWebhook", "requestBody" : { "description" : "Payload for card_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CardUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "customer_created" : { "description" : "

Triggered when a customer is created.

", "post" : { "summary" : "Triggered when a customer is created.", "description" : "

Triggered when a customer is created.

", "operationId" : "onCustomer_createdWebhook", "requestBody" : { "description" : "Payload for customer_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CustomerCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_renewal_reminder" : { "description" : "

Triggered 3 days before each subscription's renewal.

", "post" : { "summary" : "Triggered 3 days before each subscription's renewal.", "description" : "

Triggered 3 days before each subscription's renewal.

", "operationId" : "onSubscription_renewal_reminderWebhook", "requestBody" : { "description" : "Payload for subscription_renewal_reminder event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionRenewalReminderEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_mrr_updated" : { "post" : { "summary" : "Triggered when an omnichannel subscription item mrr is updated", "operationId" : "onOmnichannel_subscription_item_mrr_updatedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_mrr_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemMrrUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "netd_payment_due_reminder" : { "post" : { "summary" : "Sent when a invoice's due period is about to end", "operationId" : "onNetd_payment_due_reminderWebhook", "requestBody" : { "description" : "Payload for netd_payment_due_reminder event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/NetdPaymentDueReminderEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "payment_due_reminder" : { "post" : { "summary" : "Triggered when an invoice in payment_due or not_paid [status](https://apidocs.chargebee.com/docs/api/invoices/invoice-object#status) remains unpaid for a configured number of days after its due date.", "operationId" : "onPayment_due_reminderWebhook", "requestBody" : { "description" : "Payload for payment_due_reminder event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentDueReminderEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_delivered" : { "description" : "

Triggered when an order is delivered.

", "post" : { "summary" : "Triggered when an order is delivered.", "description" : "

Triggered when an order is delivered.

", "operationId" : "onOrder_deliveredWebhook", "requestBody" : { "description" : "Payload for order_delivered event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderDeliveredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_cancellation_scheduled" : { "description" : "

Triggered when an omnichannel subscription item is scheduled for cancellation.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is scheduled for cancellation", "description" : "

Triggered when an omnichannel subscription item is scheduled for cancellation.

", "operationId" : "onOmnichannel_subscription_item_cancellation_scheduledWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_cancellation_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemCancellationScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_grace_period_expired" : { "description" : "

Triggered when an omnichannel subscription item's grace period has expired.

", "post" : { "summary" : "Triggered when an omnichannel subscription item's grace period has expired", "description" : "

Triggered when an omnichannel subscription item's grace period has expired.

", "operationId" : "onOmnichannel_subscription_item_grace_period_expiredWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_grace_period_expired event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemGracePeriodExpiredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_codes_added" : { "description" : "

Triggered when coupon codes are added in coupon set.

", "post" : { "summary" : "Triggered when coupon codes are added in coupon set.", "description" : "

Triggered when coupon codes are added in coupon set.

", "operationId" : "onCoupon_codes_addedWebhook", "requestBody" : { "description" : "Payload for coupon_codes_added event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponCodesAddedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "gift_cancelled" : { "description" : "

Triggered when gift is cancelled.

", "post" : { "summary" : "Triggered when gift is cancelled.", "description" : "

Triggered when gift is cancelled.

", "operationId" : "onGift_cancelledWebhook", "requestBody" : { "description" : "Payload for gift_cancelled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/GiftCancelledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_cancelled" : { "description" : "

Triggered when an order is cancelled.

", "post" : { "summary" : "Triggered when an order is cancelled.", "description" : "

Triggered when an order is cancelled.

", "operationId" : "onOrder_cancelledWebhook", "requestBody" : { "description" : "Payload for order_cancelled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderCancelledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_deleted" : { "description" : "

Triggered when a coupon is deleted.

", "post" : { "summary" : "Triggered when a coupon is deleted.", "description" : "

Triggered when a coupon is deleted.

", "operationId" : "onCoupon_deletedWebhook", "requestBody" : { "description" : "Payload for coupon_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_scheduled_changes_removed" : { "description" : "

Triggered when scheduled change for the subscription is removed.

", "post" : { "summary" : "Triggered when scheduled change for the subscription is removed.", "description" : "

Triggered when scheduled change for the subscription is removed.

", "operationId" : "onSubscription_scheduled_changes_removedWebhook", "requestBody" : { "description" : "Payload for subscription_scheduled_changes_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionScheduledChangesRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "pending_invoice_created" : { "description" : "

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.

", "post" : { "summary" : "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.", "description" : "

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.

", "operationId" : "onPending_invoice_createdWebhook", "requestBody" : { "description" : "Payload for pending_invoice_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PendingInvoiceCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "product_deleted" : { "post" : { "summary" : "Triggered when a product resource is deleted successfully", "operationId" : "onProduct_deletedWebhook", "requestBody" : { "description" : "Payload for product_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ProductDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "entitlement_overrides_auto_removed" : { "description" : "

When a limited period entitlement_override expires, it is no longer returned. No event is immediately triggered for it. However, after expiry, the entitlement_override record gets deleted within 12 hours, triggering the entitlement_overrides_auto_removed event. Therefore, this event can be considered a delayed notification for one or more entitlement_overrides having expired.

", "post" : { "summary" : "When a limited period `entitlement_override` expires, it is no longer returned. No event is immediately triggered for it. However, after expiry, the `entitlement_override` record gets deleted within 12 hours, triggering the `entitlement_overrides_auto_removed` event. Therefore, this event can be considered a delayed notification for one or more `entitlement_overrides` having expired.", "description" : "

When a limited period entitlement_override expires, it is no longer returned. No event is immediately triggered for it. However, after expiry, the entitlement_override record gets deleted within 12 hours, triggering the entitlement_overrides_auto_removed event. Therefore, this event can be considered a delayed notification for one or more entitlement_overrides having expired.

", "operationId" : "onEntitlement_overrides_auto_removedWebhook", "requestBody" : { "description" : "Payload for entitlement_overrides_auto_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/EntitlementOverridesAutoRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_upgraded" : { "description" : "

Triggered when an omnichannel subscription item is upgraded.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is upgraded", "description" : "

Triggered when an omnichannel subscription item is upgraded.

", "operationId" : "onOmnichannel_subscription_item_upgradedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_upgraded event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemUpgradedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_business_entity_changed" : { "post" : { "summary" : "Triggered when a subscription's business entity is changed", "operationId" : "onSubscription_business_entity_changedWebhook", "requestBody" : { "description" : "Payload for subscription_business_entity_changed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionBusinessEntityChangedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_one_time_order_created" : { "post" : { "summary" : "Triggered when an omnichannel one time order is created", "operationId" : "onOmnichannel_one_time_order_createdWebhook", "requestBody" : { "description" : "Payload for omnichannel_one_time_order_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelOneTimeOrderCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_source_deleted" : { "description" : "

Triggered when a payment source is deleted.

", "post" : { "summary" : "Triggered when a payment source is deleted.", "description" : "

Triggered when a payment source is deleted.

", "operationId" : "onPayment_source_deletedWebhook", "requestBody" : { "description" : "Payload for payment_source_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSourceDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_cancelled" : { "description" : "

Triggered when an omnichannel subscription item is cancelled.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is cancelled", "description" : "

Triggered when an omnichannel subscription item is cancelled.

", "operationId" : "onOmnichannel_subscription_item_cancelledWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_cancelled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemCancelledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "quote_deleted" : { "description" : "

Event triggered when a new quote is deleted.

", "post" : { "summary" : "Event triggered when a new quote is deleted.", "description" : "

Event triggered when a new quote is deleted.

", "operationId" : "onQuote_deletedWebhook", "requestBody" : { "description" : "Payload for quote_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/QuoteDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "invoice_updated" : { "description" : "

Triggered when changes are made to a finalized invoice, including voiding, deletion, invoice address updates, status changes, and payment changes such as applying or removing a payment, applying or removing a credit, and credit note creation. pending_invoice_updated is triggered for changes specific to pending invoices; invoice_updated covers all other invoice changes.

", "post" : { "summary" : "Triggered when you make the following changes to a pending invoice - add a charge, add a non-recurring addon, or delete a line item.", "description" : "

Triggered when changes are made to a finalized invoice, including voiding, deletion, invoice address updates, status changes, and payment changes such as applying or removing a payment, applying or removing a credit, and credit note creation. pending_invoice_updated is triggered for changes specific to pending invoices; invoice_updated covers all other invoice changes.

", "operationId" : "onInvoice_updatedWebhook", "requestBody" : { "description" : "Payload for invoice_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/InvoiceUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_advance_invoice_schedule_removed" : { "description" : "

Triggered when scheduled advance invoice is removed for a subscription.

", "post" : { "summary" : "Triggered when scheduled advance invoice is removed for a subscription.", "description" : "

Triggered when scheduled advance invoice is removed for a subscription.

", "operationId" : "onSubscription_advance_invoice_schedule_removedWebhook", "requestBody" : { "description" : "Payload for subscription_advance_invoice_schedule_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionAdvanceInvoiceScheduleRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "card_deleted" : { "description" : "

Triggered when a card is deleted for a customer.

", "post" : { "summary" : "Triggered when a card is deleted for a customer.", "description" : "

Triggered when a card is deleted for a customer.

", "operationId" : "onCard_deletedWebhook", "requestBody" : { "description" : "Payload for card_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CardDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_ready_to_ship" : { "description" : "

Triggered when an order reaches it's shipping date.

", "post" : { "summary" : "Triggered when an order reaches it's shipping date.", "description" : "

Triggered when an order reaches it's shipping date.

", "operationId" : "onOrder_ready_to_shipWebhook", "requestBody" : { "description" : "Payload for order_ready_to_ship event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderReadyToShipEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "variant_updated" : { "post" : { "summary" : "Triggered when a product variant resource is updated successfully", "operationId" : "onVariant_updatedWebhook", "requestBody" : { "description" : "Payload for variant_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VariantUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "subscription_moved_out" : { "description" : "

Triggered when the subscription is moving out from one customer to another asynchronously.

", "post" : { "summary" : "Triggered when a subscription moved to other customer", "description" : "

Triggered when the subscription is moving out from one customer to another asynchronously.

", "operationId" : "onSubscription_moved_outWebhook", "requestBody" : { "description" : "Payload for subscription_moved_out event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionMovedOutEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_schedule_scheme_created" : { "post" : { "summary" : "Event triggered when a new payment schedule scheme is created", "operationId" : "onPayment_schedule_scheme_createdWebhook", "requestBody" : { "description" : "Payload for payment_schedule_scheme_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentScheduleSchemeCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "business_entity_updated" : { "description" : "

Triggered when a business entity is changed

", "post" : { "summary" : "Triggered when a business entity is changed", "description" : "

Triggered when a business entity is changed

", "operationId" : "onBusiness_entity_updatedWebhook", "requestBody" : { "description" : "Payload for business_entity_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BusinessEntityUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_scheduled_resumption_removed" : { "description" : "

Triggered when scheduled resumption is removed for the subscription.

", "post" : { "summary" : "Triggered when scheduled resumption is removed for the subscription.", "description" : "

Triggered when scheduled resumption is removed for the subscription.

", "operationId" : "onSubscription_scheduled_resumption_removedWebhook", "requestBody" : { "description" : "Payload for subscription_scheduled_resumption_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionScheduledResumptionRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_initiated" : { "description" : "

Triggered when a payment is initiated using the direct_debit payment method, or when a transaction enters the in_progress status due to asynchronous processing at the payment gateway.

", "post" : { "summary" : "Triggered when a payment is initiated via direct debit.", "description" : "

Triggered when a payment is initiated using the direct_debit payment method, or when a transaction enters the in_progress status due to asynchronous processing at the payment gateway.

", "operationId" : "onPayment_initiatedWebhook", "requestBody" : { "description" : "Payload for payment_initiated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentInitiatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "feature_archived" : { "description" : "

Triggered when a feature status transitions to archived.

", "post" : { "summary" : "Triggered when a `feature` status transitions to `archived`.", "description" : "

Triggered when a feature status transitions to archived.

", "operationId" : "onFeature_archivedWebhook", "requestBody" : { "description" : "Payload for feature_archived event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/FeatureArchivedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_reactivated_with_backdating" : { "description" : "

Triggered when the subscription is moved from cancelled status to active or in_trial, while reactivate_from is set to a value in the past.

", "post" : { "summary" : "Triggered when the subscription is moved from `cancelled` `status` to `active` or `in_trial`, while `reactivate_from` is set to a value in the past.", "description" : "

Triggered when the subscription is moved from cancelled status to active or in_trial, while reactivate_from is set to a value in the past.

", "operationId" : "onSubscription_reactivated_with_backdatingWebhook", "requestBody" : { "description" : "Payload for subscription_reactivated_with_backdating event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionReactivatedWithBackdatingEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_imported" : { "description" : "

Triggered when an omnichannel subscription is imported.

", "post" : { "summary" : "Triggered when an omnichannel subscription is imported", "description" : "

Triggered when an omnichannel subscription is imported.

", "operationId" : "onOmnichannel_subscription_importedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_imported event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionImportedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "token_expired" : { "description" : "

Triggered when a nonce is expired.

", "post" : { "summary" : "Triggered when a nonce is expired.", "description" : "

Triggered when a nonce is expired.

", "operationId" : "onToken_expiredWebhook", "requestBody" : { "description" : "Payload for token_expired event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TokenExpiredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "card_added" : { "description" : "

Triggered when a card is added for a customer.

", "post" : { "summary" : "Triggered when a card is added for a customer.", "description" : "

Triggered when a card is added for a customer.

", "operationId" : "onCard_addedWebhook", "requestBody" : { "description" : "Payload for card_added event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CardAddedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_created" : { "description" : "

Triggered when a coupon is created.

", "post" : { "summary" : "Triggered when a coupon is created.", "description" : "

Triggered when a coupon is created.

", "operationId" : "onCoupon_createdWebhook", "requestBody" : { "description" : "Payload for coupon_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "rule_deleted" : { "post" : { "summary" : "Triggered when a rule is deleted", "operationId" : "onRule_deletedWebhook", "requestBody" : { "description" : "Payload for rule_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RuleDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_price_entitlements_updated" : { "description" : "

One or more entitlements were added or updated for an item_price.

", "post" : { "summary" : "One or more `item_price_entitlement`s were added or updated for an `item_price` or a `feature`.", "description" : "

One or more entitlements were added or updated for an item_price.

", "operationId" : "onItem_price_entitlements_updatedWebhook", "requestBody" : { "description" : "Payload for item_price_entitlements_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemPriceEntitlementsUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_price_deleted" : { "description" : "

Triggered when an item price is deleted.

", "post" : { "summary" : "Triggered when an item price is deleted.", "description" : "

Triggered when an item price is deleted.

", "operationId" : "onItem_price_deletedWebhook", "requestBody" : { "description" : "Payload for item_price_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemPriceDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "virtual_bank_account_deleted" : { "description" : "

Triggered when a virtual bank account is deleted.

", "post" : { "summary" : "Triggered when a virtual bank account is deleted.", "description" : "

Triggered when a virtual bank account is deleted.

", "operationId" : "onVirtual_bank_account_deletedWebhook", "requestBody" : { "description" : "Payload for virtual_bank_account_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VirtualBankAccountDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_schedule_scheme_deleted" : { "post" : { "summary" : "Event triggered when a payment schedule scheme is deleted", "operationId" : "onPayment_schedule_scheme_deletedWebhook", "requestBody" : { "description" : "Payload for payment_schedule_scheme_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentScheduleSchemeDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_created" : { "description" : "

Triggered when a new subscription is created.

", "post" : { "summary" : "Triggered when a new subscription is created.", "description" : "

Triggered when a new subscription is created.

", "operationId" : "onSubscription_createdWebhook", "requestBody" : { "description" : "Payload for subscription_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_entitlements_created" : { "description" : "

Triggered on subscription creation, alongside the subscription_created event whenever the subscription has subscription_entitlements. The event payload contains the first 100 subscription_entitlements. The has_next attribute is set to true if more than 100 subscription entitlements are available. You can retrieve the next page by calling the "List subscription entitlements" endpoint, passing the offset parameter as 1.

", "post" : { "summary" : "Triggered on subscription creation, alongside the subscription_created event whenever the subscription has subscription_entitlements. The event payload contains the first 100 subscription_entitlements. The has_next attribute is set to true if more than 100 subscription entitlements are available. You can retrieve the next page by calling the “List subscription entitlements” endpoint, passing the offset parameter as 1.", "description" : "

Triggered on subscription creation, alongside the subscription_created event whenever the subscription has subscription_entitlements. The event payload contains the first 100 subscription_entitlements. The has_next attribute is set to true if more than 100 subscription entitlements are available. You can retrieve the next page by calling the "List subscription entitlements" endpoint, passing the offset parameter as 1.

", "operationId" : "onSubscription_entitlements_createdWebhook", "requestBody" : { "description" : "Payload for subscription_entitlements_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionEntitlementsCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_returned" : { "description" : "

Triggered when an order is returned.

", "post" : { "summary" : "Triggered when an order is returned.", "description" : "

Triggered when an order is returned.

", "operationId" : "onOrder_returnedWebhook", "requestBody" : { "description" : "Payload for order_returned event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderReturnedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_deleted" : { "description" : "

Triggered when a subscription is deleted.

", "post" : { "summary" : "Triggered when a subscription is deleted.", "description" : "

Triggered when a subscription is deleted.

", "operationId" : "onSubscription_deletedWebhook", "requestBody" : { "description" : "Payload for subscription_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_source_added" : { "description" : "

Triggered when a payment source is added.

", "post" : { "summary" : "Triggered when a payment source is added.", "description" : "

Triggered when a payment source is added.

", "operationId" : "onPayment_source_addedWebhook", "requestBody" : { "description" : "Payload for payment_source_added event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSourceAddedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_moved_in" : { "description" : "

Triggered when the subscription is moving in from one customer to another asynchronously.

", "post" : { "summary" : "Triggered when a subscription moved from other customer", "description" : "

Triggered when the subscription is moving in from one customer to another asynchronously.

", "operationId" : "onSubscription_moved_inWebhook", "requestBody" : { "description" : "Payload for subscription_moved_in event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionMovedInEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "ledger_updated" : { "description" : "

Triggered when a batch of ledger operations is persisted for a subscription unit.\nThe event content includes the related ledger_operations, ledger_account_balance, grant_blocks, and ledger_entries.

", "post" : { "summary" : "Triggered when a batch of ledger operations is persisted for a subscription unit.", "description" : "

Triggered when a batch of ledger operations is persisted for a subscription unit.\nThe event content includes the related ledger_operations, ledger_account_balance, grant_blocks, and ledger_entries.

", "operationId" : "onLedger_updatedWebhook", "requestBody" : { "description" : "Payload for ledger_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/LedgerUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_price_created" : { "description" : "

Triggered when an item price is created.

", "post" : { "summary" : "Triggered when an item price is created.", "description" : "

Triggered when an item price is created.

", "operationId" : "onItem_price_createdWebhook", "requestBody" : { "description" : "Payload for item_price_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemPriceCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_scheduled_cancellation_removed" : { "description" : "

Triggered when scheduled cancellation is removed for the subscription.

", "post" : { "summary" : "Triggered when scheduled cancellation is removed for the subscription.", "description" : "

Triggered when scheduled cancellation is removed for the subscription.

", "operationId" : "onSubscription_scheduled_cancellation_removedWebhook", "requestBody" : { "description" : "Payload for subscription_scheduled_cancellation_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionScheduledCancellationRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_refunded" : { "description" : "

Triggered when a payment refund is made.

", "post" : { "summary" : "Triggered when a payment refund is made.", "description" : "

Triggered when a payment refund is made.

", "operationId" : "onPayment_refundedWebhook", "requestBody" : { "description" : "Payload for payment_refunded event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentRefundedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "usage_file_ingested" : { "post" : { "summary" : "Triggered when a usage file is ingested", "operationId" : "onUsage_file_ingestedWebhook", "requestBody" : { "description" : "Payload for usage_file_ingested event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UsageFileIngestedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "product_created" : { "post" : { "summary" : "Triggered when a product resource is created successfully", "operationId" : "onProduct_createdWebhook", "requestBody" : { "description" : "Payload for product_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ProductCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "omnichannel_subscription_moved_in" : { "description" : "

Triggered when an omnichannel subscription is moved to another customer

", "post" : { "summary" : "Triggered when an omnichannel subscription is moved to another customer", "description" : "

Triggered when an omnichannel subscription is moved to another customer

", "operationId" : "onOmnichannel_subscription_moved_inWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_moved_in event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionMovedInEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "differential_price_created" : { "description" : "

Triggered when a differential price is created.

", "post" : { "summary" : "Triggered when a differential price is created.", "description" : "

Triggered when a differential price is created.

", "operationId" : "onDifferential_price_createdWebhook", "requestBody" : { "description" : "Payload for differential_price_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DifferentialPriceCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "transaction_created" : { "description" : "

Triggered when a transaction is recorded.

", "post" : { "summary" : "Triggered when a transaction is recorded.", "description" : "

Triggered when a transaction is recorded.

", "operationId" : "onTransaction_createdWebhook", "requestBody" : { "description" : "Payload for transaction_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_downgrade_scheduled" : { "post" : { "summary" : "Triggered when an omnichannel subscription item downgrade is scheduled", "operationId" : "onOmnichannel_subscription_item_downgrade_scheduledWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_downgrade_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemDowngradeScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "payment_succeeded" : { "description" : "

Triggered when the payment is successfully collected.

", "post" : { "summary" : "Triggered when the payment is successfully collected.", "description" : "

Triggered when the payment is successfully collected.

", "operationId" : "onPayment_succeededWebhook", "requestBody" : { "description" : "Payload for payment_succeeded event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSucceededEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_canceled_with_backdating" : { "description" : "

Triggered when a subscription is canceled with cancel_at set to a value in the past.

", "post" : { "summary" : "Triggered when a subscription is canceled with cancel_at set to a value in the past.", "description" : "

Triggered when a subscription is canceled with cancel_at set to a value in the past.

", "operationId" : "onSubscription_canceled_with_backdatingWebhook", "requestBody" : { "description" : "Payload for subscription_canceled_with_backdating event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionCanceledWithBackdatingEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "unbilled_charges_voided" : { "description" : "

Triggered when unbilled charges are voided

", "post" : { "summary" : "Triggered when unbilled charges are voided", "description" : "

Triggered when unbilled charges are voided

", "operationId" : "onUnbilled_charges_voidedWebhook", "requestBody" : { "description" : "Payload for unbilled_charges_voided event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UnbilledChargesVoidedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "quote_created" : { "description" : "

Event triggered when a new quote is generated.

", "post" : { "summary" : "Event triggered when a new quote is generated.", "description" : "

Event triggered when a new quote is generated.

", "operationId" : "onQuote_createdWebhook", "requestBody" : { "description" : "Payload for quote_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/QuoteCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_set_deleted" : { "description" : "

Triggered when a coupon set is deleted.

", "post" : { "summary" : "Triggered when a coupon set is deleted.", "description" : "

Triggered when a coupon set is deleted.

", "operationId" : "onCoupon_set_deletedWebhook", "requestBody" : { "description" : "Payload for coupon_set_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponSetDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "attached_item_created" : { "description" : "

Triggered when an attached item is created.

", "post" : { "summary" : "Triggered when an attached item is created.", "description" : "

Triggered when an attached item is created.

", "operationId" : "onAttached_item_createdWebhook", "requestBody" : { "description" : "Payload for attached_item_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AttachedItemCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "sales_order_created" : { "post" : { "summary" : "Triggered when a new sales order is created.", "operationId" : "onSales_order_createdWebhook", "requestBody" : { "description" : "Payload for sales_order_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SalesOrderCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "customer_changed" : { "description" : "

Triggered when customer details are changed, and the payment method role of a customer is updated.

", "post" : { "summary" : "Triggered when a customer is changed.", "description" : "

Triggered when customer details are changed, and the payment method role of a customer is updated.

", "operationId" : "onCustomer_changedWebhook", "requestBody" : { "description" : "Payload for customer_changed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CustomerChangedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_started" : { "description" : "

Triggered when a 'future' subscription gets started.

", "post" : { "summary" : "Triggered when a 'future' subscription gets started.", "description" : "

Triggered when a 'future' subscription gets started.

", "operationId" : "onSubscription_startedWebhook", "requestBody" : { "description" : "Payload for subscription_started event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionStartedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_activated" : { "description" : "

Triggered after the subscription has been moved from "Trial" to "Active" state.

", "post" : { "summary" : "Triggered after the subscription has been moved from \"Trial\" to \"Active\" state.", "description" : "

Triggered after the subscription has been moved from "Trial" to "Active" state.

", "operationId" : "onSubscription_activatedWebhook", "requestBody" : { "description" : "Payload for subscription_activated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionActivatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_source_expiring" : { "description" : "

Triggered when the customer's payment source is expiring soon. Triggered 30 days before the expiry date.

", "post" : { "summary" : "Triggered when the customer's payment source is expiring soon. Triggered 30 days before the expiry date.", "description" : "

Triggered when the customer's payment source is expiring soon. Triggered 30 days before the expiry date.

", "operationId" : "onPayment_source_expiringWebhook", "requestBody" : { "description" : "Payload for payment_source_expiring event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSourceExpiringEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_reactivated" : { "description" : "

Triggered when the subscription is moved from cancelled status to active or in_trial.

", "post" : { "summary" : "Triggered when the subscription is moved from `cancelled` `status` to `active` or `in_trial`.", "description" : "

Triggered when the subscription is moved from cancelled status to active or in_trial.

", "operationId" : "onSubscription_reactivatedWebhook", "requestBody" : { "description" : "Payload for subscription_reactivated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionReactivatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_updated" : { "description" : "

Triggered when an order is updated.

", "post" : { "summary" : "Triggered when an order is updated.", "description" : "

Triggered when an order is updated.

", "operationId" : "onOrder_updatedWebhook", "requestBody" : { "description" : "Payload for order_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_scheduled_pause_removed" : { "description" : "

Triggered when scheduled pause is removed for the subscription.

", "post" : { "summary" : "Triggered when scheduled pause is removed for the subscription.", "description" : "

Triggered when scheduled pause is removed for the subscription.

", "operationId" : "onSubscription_scheduled_pause_removedWebhook", "requestBody" : { "description" : "Payload for subscription_scheduled_pause_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionScheduledPauseRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_cancellation_reminder" : { "description" : "

Triggered 6 days prior to the scheduled cancellation date.

", "post" : { "summary" : "Triggered 6 days prior to the scheduled cancellation date.", "description" : "

Triggered 6 days prior to the scheduled cancellation date.

", "operationId" : "onSubscription_cancellation_reminderWebhook", "requestBody" : { "description" : "Payload for subscription_cancellation_reminder event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionCancellationReminderEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_created_with_backdating" : { "description" : "

Triggered when a subscription is created and the value of subscription.started_at is in the past.

", "post" : { "summary" : "Triggered when a subscription is created and the value of subscription.started_at is in the past.", "description" : "

Triggered when a subscription is created and the value of subscription.started_at is in the past.

", "operationId" : "onSubscription_created_with_backdatingWebhook", "requestBody" : { "description" : "Payload for subscription_created_with_backdating event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionCreatedWithBackdatingEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_ramp_created" : { "description" : "

Triggered when a ramp is created.

", "post" : { "summary" : "Triggered when a ramp is created.", "description" : "

Triggered when a ramp is created.

", "operationId" : "onSubscription_ramp_createdWebhook", "requestBody" : { "description" : "Payload for subscription_ramp_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionRampCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_deleted" : { "description" : "

Triggered when an order is deleted.

", "post" : { "summary" : "Triggered when an order is deleted.", "description" : "

Triggered when an order is deleted.

", "operationId" : "onOrder_deletedWebhook", "requestBody" : { "description" : "Payload for order_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_pause_scheduled" : { "description" : "

Triggered when an omnichannel subscription item is scheduled for pause.

", "post" : { "summary" : "Triggered when an omnichannel subscription item is scheduled for pause.", "description" : "

Triggered when an omnichannel subscription item is scheduled for pause.

", "operationId" : "onOmnichannel_subscription_item_pause_scheduledWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_pause_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemPauseScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "gift_updated" : { "description" : "

Triggered when a gift is updated.

", "post" : { "summary" : "Triggered when a gift is updated.", "description" : "

Triggered when a gift is updated.

", "operationId" : "onGift_updatedWebhook", "requestBody" : { "description" : "Payload for gift_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/GiftUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_trial_extended" : { "description" : "

Trial Extension

", "post" : { "summary" : "Trial Extension", "description" : "

Trial Extension

", "operationId" : "onSubscription_trial_extendedWebhook", "requestBody" : { "description" : "Payload for subscription_trial_extended event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionTrialExtendedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_grace_period_started" : { "description" : "

Triggered when an omnichannel subscription item has entered a grace period.

", "post" : { "summary" : "Triggered when an omnichannel subscription item's grace period has started", "description" : "

Triggered when an omnichannel subscription item has entered a grace period.

", "operationId" : "onOmnichannel_subscription_item_grace_period_startedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_grace_period_started event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemGracePeriodStartedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "card_expiry_reminder" : { "description" : "

Triggered when the customer's credit card is expiring soon. Triggered 30 days before the expiry date.

", "post" : { "summary" : "Triggered when the customer's credit card is expiring soon. Triggered 30 days before the expiry date.", "description" : "

Triggered when the customer's credit card is expiring soon. Triggered 30 days before the expiry date.

", "operationId" : "onCard_expiry_reminderWebhook", "requestBody" : { "description" : "Payload for card_expiry_reminder event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CardExpiryReminderEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "token_created" : { "description" : "

Triggered when a nonce is created.

", "post" : { "summary" : "Triggered when a nonce is created.", "description" : "

Triggered when a nonce is created.

", "operationId" : "onToken_createdWebhook", "requestBody" : { "description" : "Payload for token_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TokenCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_source_business_entity_changed" : { "post" : { "summary" : "Triggered when a payment source's business entity is changed", "operationId" : "onPayment_source_business_entity_changedWebhook", "requestBody" : { "description" : "Payload for payment_source_business_entity_changed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSourceBusinessEntityChangedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "promotional_credits_added" : { "description" : "

Triggered when promotional credit is added.

", "post" : { "summary" : "Triggered when promotional credit is added.", "description" : "

Triggered when promotional credit is added.

", "operationId" : "onPromotional_credits_addedWebhook", "requestBody" : { "description" : "Payload for promotional_credits_added event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PromotionalCreditsAddedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_ramp_updated" : { "description" : "

Triggered when a ramp is updated.

", "post" : { "summary" : "Triggered when a subscription ramp is updated.", "description" : "

Triggered when a ramp is updated.

", "operationId" : "onSubscription_ramp_updatedWebhook", "requestBody" : { "description" : "Payload for subscription_ramp_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionRampUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "ledger_account_balance_updated" : { "description" : "

Triggered when a ledger account balance changes for a subscription unit.\nThe event content includes the updated ledger_account_balance.

", "post" : { "summary" : "Triggered when a ledger account balance changes for a subscription unit.", "description" : "

Triggered when a ledger account balance changes for a subscription unit.\nThe event content includes the updated ledger_account_balance.

", "operationId" : "onLedger_account_balance_updatedWebhook", "requestBody" : { "description" : "Payload for ledger_account_balance_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/LedgerAccountBalanceUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "vault_token_created" : { "post" : { "summary" : "Triggered when a vaulted payment method is created for orchestrator vaulting", "operationId" : "onVault_token_createdWebhook", "requestBody" : { "description" : "Payload for vault_token_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/VaultTokenCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "customer_entitlements_updated" : { "description" : "

Triggered when a customer_entitlement is updated.

", "post" : { "summary" : "Triggered when entitlements for the list of customers got updated.", "description" : "

Triggered when a customer_entitlement is updated.

", "operationId" : "onCustomer_entitlements_updatedWebhook", "requestBody" : { "description" : "Payload for customer_entitlements_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CustomerEntitlementsUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_source_expired" : { "description" : "

Triggered when the payment source for a customer has expired.

", "post" : { "summary" : "Triggered when the payment source for a customer has expired.", "description" : "

Triggered when the payment source for a customer has expired.

", "operationId" : "onPayment_source_expiredWebhook", "requestBody" : { "description" : "Payload for payment_source_expired event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSourceExpiredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "customer_moved_out" : { "description" : "

Triggered when a customer is copied to another site.

", "post" : { "summary" : "Triggered when a customer is copied to another site.", "description" : "

Triggered when a customer is copied to another site.

", "operationId" : "onCustomer_moved_outWebhook", "requestBody" : { "description" : "Payload for customer_moved_out event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CustomerMovedOutEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_entitlements_updated" : { "description" : "

Triggered on subscription change, alongside the subscription_changed event whenever there are updates to a subscription's entitlements resulting from modifications to its recurring and non recurring items. The event payload contains the first 100 subscription_entitlements. The has_next attribute is set to true if more than 100 subscription entitlements are available. You can retrieve the next page by calling the "List subscription entitlements" endpoint, passing the offset parameter as 1.

", "post" : { "summary" : "Triggered on subscription update, alongside the subscription_updated event whenever the subscription has subscription_entitlements updated. The event payload contains the first 100 subscription_entitlements. The has_next attribute is set to true if more than 100 subscription entitlements are available. You can retrieve the next page by calling the “List subscription entitlements” endpoint, passing the offset parameter as 1.", "description" : "

Triggered on subscription change, alongside the subscription_changed event whenever there are updates to a subscription's entitlements resulting from modifications to its recurring and non recurring items. The event payload contains the first 100 subscription_entitlements. The has_next attribute is set to true if more than 100 subscription entitlements are available. You can retrieve the next page by calling the "List subscription entitlements" endpoint, passing the offset parameter as 1.

", "operationId" : "onSubscription_entitlements_updatedWebhook", "requestBody" : { "description" : "Payload for subscription_entitlements_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionEntitlementsUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_dunning_expired" : { "description" : "

Triggered when an omnichannel subscription item's dunning period has expired.

", "post" : { "summary" : "Triggered when an omnichannel subscription item's dunning has expired", "description" : "

Triggered when an omnichannel subscription item's dunning period has expired.

", "operationId" : "onOmnichannel_subscription_item_dunning_expiredWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_dunning_expired event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemDunningExpiredEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "hierarchy_created" : { "description" : "

Triggered when a hierarchy is created.

", "post" : { "summary" : "Triggered when a hierarchy is created.", "description" : "

Triggered when a hierarchy is created.

", "operationId" : "onHierarchy_createdWebhook", "requestBody" : { "description" : "Payload for hierarchy_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HierarchyCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "attached_item_deleted" : { "description" : "

Triggered when an attached item is deleted.

", "post" : { "summary" : "Triggered when an attached item is deleted.", "description" : "

Triggered when an attached item is deleted.

", "operationId" : "onAttached_item_deletedWebhook", "requestBody" : { "description" : "Payload for attached_item_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AttachedItemDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_scheduled_cancellation_removed" : { "description" : "

Triggered when an omnichannel subscription item scheduled cancellation is removed.

", "post" : { "summary" : "Triggered when an omnichannel subscription item scheduled cancellation is removed", "description" : "

Triggered when an omnichannel subscription item scheduled cancellation is removed.

", "operationId" : "onOmnichannel_subscription_item_scheduled_cancellation_removedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_scheduled_cancellation_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledCancellationRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_updated" : { "description" : "

Triggered when an item is updated.

", "post" : { "summary" : "Triggered when an item is updated.", "description" : "

Triggered when an item is updated.

", "operationId" : "onItem_updatedWebhook", "requestBody" : { "description" : "Payload for item_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "coupon_set_created" : { "description" : "

Triggered when a coupon set is created.

", "post" : { "summary" : "Triggered when a coupon set is created.", "description" : "

Triggered when a coupon set is created.

", "operationId" : "onCoupon_set_createdWebhook", "requestBody" : { "description" : "Payload for coupon_set_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CouponSetCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_intent_updated" : { "description" : "

Triggered when a payment intent is updated.

", "post" : { "summary" : "Triggered when a payment intent is updated.", "description" : "

Triggered when a payment intent is updated.

", "operationId" : "onPayment_intent_updatedWebhook", "requestBody" : { "description" : "Payload for payment_intent_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentIntentUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "order_resent" : { "description" : "

Triggered when an order is resent.

", "post" : { "summary" : "Triggered when an order is resent.", "description" : "

Triggered when an order is resent.

", "operationId" : "onOrder_resentWebhook", "requestBody" : { "description" : "Payload for order_resent event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrderResentEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_scheduled_downgrade_removed" : { "post" : { "summary" : "Triggered when an omnichannel subscription item scheduled downgrade is removed", "operationId" : "onOmnichannel_subscription_item_scheduled_downgrade_removedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_scheduled_downgrade_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemScheduledDowngradeRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : true } }, "omnichannel_subscription_created" : { "description" : "

Triggered when an omnichannel subscription is created.

", "post" : { "summary" : "Triggered when an omnichannel subscription is created", "description" : "

Triggered when an omnichannel subscription is created.

", "operationId" : "onOmnichannel_subscription_createdWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "tax_withheld_recorded" : { "description" : "

Triggered when a tax withheld is recorded for an invoice.

", "post" : { "summary" : "Triggered when a tax withheld is recorded for an invoice.", "description" : "

Triggered when a tax withheld is recorded for an invoice.

", "operationId" : "onTax_withheld_recordedWebhook", "requestBody" : { "description" : "Payload for tax_withheld_recorded event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TaxWithheldRecordedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "price_variant_created" : { "description" : "

Triggered when a price variant resource is created successfully

", "post" : { "summary" : "Triggered when a price variant is created.", "description" : "

Triggered when a price variant resource is created successfully

", "operationId" : "onPrice_variant_createdWebhook", "requestBody" : { "description" : "Payload for price_variant_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PriceVariantCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "differential_price_deleted" : { "description" : "

Triggered when a differential price is deleted.

", "post" : { "summary" : "Triggered when a differential price is deleted.", "description" : "

Triggered when a differential price is deleted.

", "operationId" : "onDifferential_price_deletedWebhook", "requestBody" : { "description" : "Payload for differential_price_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DifferentialPriceDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_items_renewed" : { "description" : "

Triggered when one or more subscription items are renewed.

", "post" : { "summary" : "Triggered when one or more Subscription Items are renewed", "description" : "

Triggered when one or more subscription items are renewed.

", "operationId" : "onSubscription_items_renewedWebhook", "requestBody" : { "description" : "Payload for subscription_items_renewed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionItemsRenewedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "rule_created" : { "post" : { "summary" : "Triggered when a rule is created", "operationId" : "onRule_createdWebhook", "requestBody" : { "description" : "Payload for rule_created event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RuleCreatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "contract_term_cancelled" : { "description" : "

Triggered when contract term is cancelled.

", "post" : { "summary" : "Triggered when contract term is cancelled.", "description" : "

Triggered when contract term is cancelled.

", "operationId" : "onContract_term_cancelledWebhook", "requestBody" : { "description" : "Payload for contract_term_cancelled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ContractTermCancelledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "contract_term_renewed" : { "description" : "

Triggered when a contract term is renewed.

", "post" : { "summary" : "Triggered when a contract term is renewed.", "description" : "

Triggered when a contract term is renewed.

", "operationId" : "onContract_term_renewedWebhook", "requestBody" : { "description" : "Payload for contract_term_renewed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ContractTermRenewedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "invoice_deleted" : { "description" : "

Event triggered when an invoice is deleted.

", "post" : { "summary" : "Event triggered when an invoice is deleted.", "description" : "

Event triggered when an invoice is deleted.

", "operationId" : "onInvoice_deletedWebhook", "requestBody" : { "description" : "Payload for invoice_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/InvoiceDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "item_price_entitlements_removed" : { "description" : "

One or more item_price_entitlements were removed for an item_price or a feature.

", "post" : { "summary" : "One or more `item_price_entitlement`s were removed for an `item_price` or a `feature`.", "description" : "

One or more item_price_entitlements were removed for an item_price or a feature.

", "operationId" : "onItem_price_entitlements_removedWebhook", "requestBody" : { "description" : "Payload for item_price_entitlements_removed event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ItemPriceEntitlementsRemovedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "sales_order_updated" : { "post" : { "summary" : "Triggered when a sales order is updated.", "operationId" : "onSales_order_updatedWebhook", "requestBody" : { "description" : "Payload for sales_order_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SalesOrderUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_dunning_started" : { "description" : "

Triggered when an omnichannel subscription item has entered a dunning period.

", "post" : { "summary" : "Triggered when an omnichannel subscription item's dunning has started", "description" : "

Triggered when an omnichannel subscription item has entered a dunning period.

", "operationId" : "onOmnichannel_subscription_item_dunning_startedWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_dunning_started event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemDunningStartedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "omnichannel_subscription_item_change_scheduled" : { "description" : "

Triggered when an omnichannel subscription item change is scheduled.

", "post" : { "summary" : "Triggered when an omnichannel subscription item change is scheduled", "description" : "

Triggered when an omnichannel subscription item change is scheduled.

", "operationId" : "onOmnichannel_subscription_item_change_scheduledWebhook", "requestBody" : { "description" : "Payload for omnichannel_subscription_item_change_scheduled event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OmnichannelSubscriptionItemChangeScheduledEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "pending_invoice_updated" : { "description" : "

Triggered when you make the following changes to a pending invoice: add a charge, add a non-recurring addon, or delete a line item.

", "post" : { "summary" : "Triggered when you make the following changes to the invoice - void, delete, invoice address update, status change, payment changes - apply payment / remove payment, credit apply/remove, credit note creation, and so on. 'Invoice_updated' is triggered for all changes made to the invoice except for the changes which trigger 'pending_invoice_updated'.", "description" : "

Triggered when you make the following changes to a pending invoice: add a charge, add a non-recurring addon, or delete a line item.

", "operationId" : "onPending_invoice_updatedWebhook", "requestBody" : { "description" : "Payload for pending_invoice_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PendingInvoiceUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "quote_updated" : { "description" : "

Triggered when a quote is updated.

", "post" : { "summary" : "Triggered when a quote is updated.", "description" : "

Triggered when a quote is updated.

", "operationId" : "onQuote_updatedWebhook", "requestBody" : { "description" : "Payload for quote_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/QuoteUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "attached_item_updated" : { "description" : "

Triggered when an attached item is updated.

", "post" : { "summary" : "Triggered when an attached item is updated.", "description" : "

Triggered when an attached item is updated.

", "operationId" : "onAttached_item_updatedWebhook", "requestBody" : { "description" : "Payload for attached_item_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AttachedItemUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "payment_source_updated" : { "description" : "

Triggered when the payment source is updated.

", "post" : { "summary" : "Triggered when the payment source is updated and also when a role is assigned to it.", "description" : "

Triggered when the payment source is updated.

", "operationId" : "onPayment_source_updatedWebhook", "requestBody" : { "description" : "Payload for payment_source_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentSourceUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "business_entity_deleted" : { "description" : "

Triggered when a business entity is deleted

", "post" : { "summary" : "Triggered when a business entity is deleted", "description" : "

Triggered when a business entity is deleted

", "operationId" : "onBusiness_entity_deletedWebhook", "requestBody" : { "description" : "Payload for business_entity_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BusinessEntityDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "grant_blocks_updated" : { "description" : "

Triggered when one or more grant blocks are updated for a subscription unit.\nThe event content includes the updated grant_blocks.

", "post" : { "summary" : "Triggered when one or more grant blocks are updated for a subscription unit.", "description" : "

Triggered when one or more grant blocks are updated for a subscription unit.\nThe event content includes the updated grant_blocks.

", "operationId" : "onGrant_blocks_updatedWebhook", "requestBody" : { "description" : "Payload for grant_blocks_updated event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/GrantBlocksUpdatedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "authorization_voided" : { "description" : "

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.

", "post" : { "summary" : "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.", "description" : "

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.

", "operationId" : "onAuthorization_voidedWebhook", "requestBody" : { "description" : "Payload for authorization_voided event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AuthorizationVoidedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } }, "subscription_ramp_deleted" : { "description" : "

Triggered when a ramp is deleted.

", "post" : { "summary" : "Triggered when a ramp is deleted.", "description" : "

Triggered when a ramp is deleted.

", "operationId" : "onSubscription_ramp_deletedWebhook", "requestBody" : { "description" : "Payload for subscription_ramp_deleted event", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubscriptionRampDeletedEvent" } } } }, "responses" : { "200" : { "description" : "Webhook received successfully" } }, "deprecated" : false } } } }